On the richness of C++

Jason House jason.james.house at gmail.com
Thu Apr 10 12:02:09 PDT 2008


Georg Wrede Wrote:

> I read
> 
> http://www.nwcpp.org/Downloads/2007/redcode_-_updated.pdf
> 
> and upon reading it I got thinking of something else. Those familiar 
> with C++ (aren't we all?) probably sometimes come across things that 
> somebody has done in C++ that are simply stunning. Things that one would 
> have thought would need a new language, or maybe just be impossible to 
> implement at all. I know I have. (A lot of Boost stuff is like that, 
> originally the STL got me breathless, but there's a lot that's not 
> template related, too.)
> 
> Is it just paranoia, or is C++ still more flexible and expressive than D?

While I don't know how I'd really implement this in C++ or D without third-party libraries, this appears to be nothing more than tuple manipulation.  If you can search for a given type in a tuple and delete a type in a tuple, then you can do this in D.  I suspect that is not a significant burden for those who practice MP.


> Are there still things you can do in C++ that are impossible or too 
> awkward to do in D?

Great question.  Do we allow as much helper code in the background that C++ users use? The paper relies on MPL (on top of TMP).  MPL isn't a small little bit of C++ code either...


> Of course, I don't mean Obfuscated C(++). While that definitely 
> demonstrates the unfathomable agility of the language, I'm only talking 
> about serious, non-juvenile stuff.



More information about the Digitalmars-d mailing list