OSNews article about C++09 degenerates into C++ vs. D discussion
Sean Kelly
sean at f4.ca
Wed Nov 22 09:53:41 PST 2006
Walter Bright wrote:
> John Reimer wrote:
>>> Wow that was long, but good, make it an article, Walter?
>
> I think it is good material for an article.
>
>> Concerning D and GC:
>>
>> The problem is that most D apologists /DO/ advertise D as having the
>> best of both worlds when it comes to memory management, but C++ fans
>> are bound and determined to see D as practically a GC-only language:
>> the GC is one of the first points they always bring up. They keep
>> seeing it in the same light as Java and other such languages. It's
>> unfair and short-sited, but a typical response.
>
> A common misconception that people have against D is that since D has
> core arrays, strings, and complex numbers, that therefore it is not
> possible to create user defined types in the library. They'll say things
> like "I prefer to use C++ because I can create my own types!" I
> patiently explain that this is not so, that there is nothing stopping
> one from creating their own user defined D types. And then they come
> back a week, a month later and repeat the same misinformation. Sigh.
Shadows of c.l.c++.m? :-) I think C++ does a fairly good job of
allowing users to define pseudo-types, but am not convinced it is worth
the consequences. Implementing a type correctly in C++ is somewhat
complicated, what with operators, various ctors, dtors, etc. And this
complexity spills over into how non-type objects must be defined,
increasing the chance of bugs from a missed ctor or dtor. Perhaps this
sort of thing should be done in a meta-language rather than user code.
As for D, I don't see the slippery slope that some C++ folks seem to.
Floating point reals are a part of the language, so why not complex? It
seems a natural fit. Same with dynamic arrays and maps. With GC,
there's no reason not to have such features in a language. As you've
said, if you don't want to use them there's no stopping you from
creating a library version.
> > If you really take an honest look at OSNEWS posts and others, you will
> > realize that some of these people are literally annoyed at D and D
> > promoters for a reason deeper and unrelated to the language. You can't
> > argue with that. Some good considerations, like Steve's, just doesn't
> > hit home with those boys.
>
> That's to be expected. Many people have bet their careers on C++ being
> the greatest ever, and nothing can change their mind. D is a personal
> affront to them. It doesn't really matter, though, because if you attend
> a C++ conference, take a look around. They're old (my age <g>). Someone
> once did a survey of the ages of D adopters, and found out they are
> dominated by much younger folks.
I don't think conference attendance is completely representative of
typical C++ users. Conferences are viewed as "training" so attendees
will typically be people who have been in the workplace for a while are
are looking to improve their skills or learn new things. Conferences
are also expensive, so young employees are less likely to get corporate
funding to attend. That said, I do agree that C++ is an "older"
language in terms of its users, and that D is much "younger" in this
respect. It makes perfect sense. C++ has been around for a long time
and D has not, and few professional programmers seem inclined to learn
new things. If anything, they're more likely to refine their existing
skill set and stick to their "specialty."
One thing that struck me about SDWest is that few of the C++ conference
attendees were what I'd consider "experts." And the few that were, were
all c.l.c++.m regulars and many were even involved in organizing things
somehow. I did meet a few young programmers--one was an electrical
engineer with far more experience in C than C++ and wanted to learn more
about the language, and the others were Bay Area locals from one
particular company, somewhat more competent with C++, but looking to
learn a bit as well. I suppose this is to be expected with a
conference, but for the C++ series I expected attendance to be a bit
different.
Sean
More information about the Digitalmars-d
mailing list