SERVING THE QUANTITATIVE FINANCE COMMUNITY

 
User avatar
Cuchulainn
Posts: 60818
Joined: July 16th, 2004, 7:38 am
Location: Amsterdam
Contact:

Modern & Effective C++ design ideas

June 1st, 2014, 7:37 am

QuoteOriginally posted by: outrunThat's why you need to make functions/algorithms non-member. Indeed, like visitors. Separate data and operations. The solution is beginning to look like a pre-GOF era visitor.And print() = 0 in a class is very bad design. I did this a while ago and then we rediscovered Visitor by migrating oprint to its own driver class(es). We need a devive context for print(Context& context) such as Console, AutioCAD etc.QuoteBtw they're pure virtual, no vtable.Fair enough, This is marginal. The real issue is Shape becomes a monolith, as I already mentioned. It flies in the face of SRP Summary: the main issue is how to maintain the explosion in the number of ops. like move() etc. 50 ops. is not unusual. Maybe a performance hit? then an option is buy a bigger machine. It's cheaper.
Last edited by Cuchulainn on May 31st, 2014, 10:00 pm, edited 1 time in total.
http://www.datasimfinancial.com
http://www.datasim.nl

Approach your problem from the right end and begin with the answers. Then one day, perhaps you will find the final question..
R. van Gulik
 
User avatar
Cuchulainn
Posts: 60818
Joined: July 16th, 2004, 7:38 am
Location: Amsterdam
Contact:

Modern & Effective C++ design ideas

October 13th, 2014, 4:57 pm

This lambda looks like an attempt to emulate Lisp's CAR primitive. Cute.Is there also a lambda for CDR with auto? i.e. the opposite of CAR.
Last edited by Cuchulainn on October 12th, 2014, 10:00 pm, edited 1 time in total.
http://www.datasimfinancial.com
http://www.datasim.nl

Approach your problem from the right end and begin with the answers. Then one day, perhaps you will find the final question..
R. van Gulik
ABOUT WILMOTT

PW by JB

Wilmott.com has been "Serving the Quantitative Finance Community" since 2001. Continued...


Twitter LinkedIn Instagram

JOBS BOARD

JOBS BOARD

Looking for a quant job, risk, algo trading,...? Browse jobs here...


GZIP: On