D - more or less power than C++?
Dave
Dave_member at pathlink.com
Sat Mar 4 09:16:28 PST 2006
In article <duaj45$1pni$1 at digitaldaemon.com>, Mike Capp says...
>
>In article <duab09$1arn$1 at digitaldaemon.com>, Walter Bright says...
>>
>>I started a new thread for this:
>>
>>"Mike Capp" <mike.capp at gmail.com> wrote in message
>>news:dua67i$12cr$1 at digitaldaemon.com...
>>> 7. D has all (well, most of) the power of C++
>>
>>I see this often and am a bit perplexed by it. What power do you feel is
>>missing?
>
>Clean, composable, deterministic resource management. I know C++ is a horrific
>Frankenstein's monster of a language, but it allows you to encapsulate resource
>management better than anything I've ever seen. I find this frustrating, because
>it's not as if D is far off. It might be that auto class members are all that's
>needed. But I've ranted this rant many times before on this NG, and nobody else
>seems particularly interested, so I won't repeat it here.
>
I'm not sure what you mean by 'auto class members', but if you meant 'classes
instantiated on the stack for which the dtor is automatically called when they
go out of scope', then I agree.
>far as it goes. (The current GC is severely suboptimal, and making it better
>will break other stuff. And I still get very annoyed by the claim that GC is
>'optional' in D.)
I agree that the current GC has performance issues (compared to the mature GC's
of most Java implementations and .NET), but I don't agree that it can't be
improved w/o breaking things. For example, you can have non-moving generational
GC's. Just making the change to some form of partial collection scheme would
make D's GC competitive for most things, I think. And stack-allocated classes
and struct ctors for D would take care of the rest.
>But that's not really the point. If you're trying to convince someone with a
>substantial investment in C++ to switch to D, one of the most important
>questions you want them to be asking is "What do I have to lose?". The
>conclusion you want them to come to is "Nothing". If instead the immediate and
>vehement answer is "Well, THIS!", you've suddenly lost a lot of momentum. That's
>all I was getting at.
They will always have years of (painful) C++ experience to lose ;) So IMHO D
needs to be exceptional in all areas, most importantly great all-around
performance (and this includes the v1.0 reference compiler). As others have
stated (paraphrasing), "the primary reason C++ is still used for so many
projects is because of it's exceptional OOP performance."
I think D is about 95% to the tipping point though.
- Dave
More information about the Digitalmars-d
mailing list