What does C++ do better than D? - StackOverflow.com

Peter Alexander no at no.no
Tue Aug 2 05:26:28 PDT 2011


== Quote from Andrei Alexandrescu (SeeWebsiteForEmail at erdani.org)'s
article
> 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_t
han_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

Here's the thing: Unless you're developing a D compiler, there's no
difference between a QoI issue and a language design issue. An
issue is an issue, whether the fix is to change the design or to
change the compiler.

In my opinion, there's very little point in discussing a language's
merit without discussing the tools. A design without an
implementation has no worth. As Steve Yegge likes to say, a
language's popularity is all about the tools.

What's more constructive? Judging a language based on the Digital
Mars Hypothetical Future D compiler, or based on DMD, GDC and LDC?

What's the point of saying that a language has no flaws, but there
are no implementations of that language?


More information about the Digitalmars-d mailing list