What does C++ do better than D? - StackOverflow.com
Andrei Alexandrescu
SeeWebsiteForEmail at erdani.org
Mon Aug 1 19:32:57 PDT 2011
On 8/1/11 7:56 PM, Brad Roberts wrote:
> On Mon, 1 Aug 2011, Peter Alexander wrote:
>
>> On 1/08/11 7:29 PM, Kagamin wrote:
>>> Walter Bright Wrote:
>>>
>>>> Now on reddit!
>>>>
>>>> http://www.reddit.com/r/programming/comments/j48tf/how_is_c_better_than_d/
>>>
>>> C++ has a better thought out type system.
>>> Nice joke.
>>> http://blog.llvm.org/2011/05/c-at-google-here-be-dragons.html
>>
>> Please read my note at the end. I believe D (probably) has a better type
>> system. It just wasn't very well though out.
>>
>> I believe many aspects of D's type system were added in without fully
>> exploring the ramifications they had on other parts of the language. There are
>> at least two pieces of evidence which support my belief:
>>
>> 1. The fact that you can't copy const struct objects containing reference
>> types.
>>
>> 2. The fact that the root object still isn't const correct.
>>
>>
>> C++ has some questionable choices for its type system, but it generally
>> doesn't prevent you from getting work done.
>
> You're mixing state of implementation with design of the type system.
> Easy enough to conflate, but still a conflation of issues.
>
> Don't get me wrong, that there's QOI issues still is a real problem. I'd
> also agree that it's in the top 10 list of real problems. I don't know
> that I'd make it #1 on the list, though. Please don't ask me what my #1
> issue is, it varies from week to week. :)
>
> Until the QOI issues are worked out, or at least reduced significantly,
> it's not clear that we'll be able to make any strong statements about the
> quality of the design.
>
> Later,
> Brad
Good point, particularly when you compare it with the QOI issues in C++
as it was maturing. And the design, too. There were times when e.g.
nobody knew when an object ought to be destroyed.
Andrei
More information about the Digitalmars-d
mailing list