Three Unlikely Successful Features of D

Adam D. Ruppe destructionator at gmail.com
Wed Mar 21 18:39:28 PDT 2012


On Wednesday, 21 March 2012 at 19:11:08 UTC, Nick Sabalausky 
wrote:
> Although, while it wasn't a major selling point in and of 
> itself, the ability to put underscores in numeric literals

Aye, that's a nice touch.

> Heh, really?

Oh yes, I was a staunch defender of C++ for a while.

"garbage collection? gah apparently you don't know how to
use RAII"

"header files? more like good thing, it's called a clean
interface"


BTW one thing I do kinda like is how you can group member
functions however you want in C++. For example, in the dmd
source, you have special features in separate files, with
all the functions still virtual from the header.

void InvariantDeclaration::toJsonBuffer(OutBuffer *buf)  { }
void DtorDeclaration::toJsonBuffer(OutBuffer *buf)       { }
void StaticCtorDeclaration::toJsonBuffer(OutBuffer *buf) { }

etc.


That's actually pretty cool. I like that kind of organization.




But, eh, D pwns C++ in so many ways that while I still
like C++, I'm no longer in the camp of "c++ is obviously
great and totally sufficient and if you don't see it,
you must be some kind of idiot" like I was for a while.


More information about the Digitalmars-d mailing list