Linked by Hadrien Grasland on Wed 15th Jun 2011 07:32 UTC, submitted by ebasconp
General Development "The recently finished C++ ISO standard, with the working name of C++0x, is due to be published this summer, following the finishing touches to the ISO spec language and standards wonks agreed upon in March."
Thread beginning with comment 477329
To read all comments associated with this story, please click here.
Meh... it's D for me now.....
by obsidian on Wed 15th Jun 2011 23:04 UTC
obsidian
Member since:
2007-05-12

After having explored the D programming language, I'm a convert. D is very much designed using a "less is more" approach, and I'm sold on it. The fact that it has garbage collection built-in is nice as well.
Simple, elegant and clean.

D is "C++ done right".

Reply Score: 2

Luminair Member since:
2007-03-30

Is D used by any large organizations, or for any large projects?

Reply Parent Score: 2

obsidian Member since:
2007-05-12

Is D used by any large organizations, or for any large projects?

I don't think so.... not yet.

However, Andrei Alexandrescu, one of the gurus in the C++ community, has written a book on D - "The D Programming Language". There is also a very active and friendly D forum at Digital Mars.

There are several D compilers. The original Digital Mars one. GDC, a D front-end to GCC. LDC, an LLVM-based one.

There's a very good list of D features here -
http://www.d-programming-language.org/comparison.html

Edited 2011-06-16 01:32 UTC

Reply Parent Score: 2

bnolsen Member since:
2006-01-06

not to star a flame war but d is way too heavy. They loaded it up with reserve keywords and just lots of extra crap. d should have been smaller and more orthogonal than c++. Instead they decided to load it up with bloat.

Edited 2011-06-16 04:20 UTC

Reply Parent Score: 2

siride Member since:
2006-01-02

What the heck are you talking about? It is C++ that has the bloat with the ten-thousand special cases for templates and constructors and operators and overloading and implicit type conversions and so forth and so on. D seems to have simplified a lot of that. I'm not sure what else you are referring to in terms of "bloat" (a term that is thrown around far too often these days -- as if we should all be doing 8-bit assembler on some 10,000 transistor chip from the 70s).

Reply Parent Score: 2

moondevil Member since:
2005-07-08

The problem with "done right" OS, tools, languages is that most of them fail victim of "worse is better" concept.

http://dreamsongs.com/WorseIsBetter.html

D is in some areas C++ done right and has quite a few nice features, but C++ has the tooling and industry support. So unless D provides a few killer features the adoption will never be that much.

A language to succeed has either to provide killer features that gather people around it until the language gains momentum, or needs industry push.

Reply Parent Score: 3

axilmar Member since:
2006-03-20

D has quite a lot of flaws, actually. More flaws than C++.

For example, the artificial separation between structs and classes.

The list is quite long.

Reply Parent Score: 3

siride Member since:
2006-01-02

The separation between structs and classes is eerily similar to the policies in .NET. It's nice to have explicit value type semantics rather than the fingers-crossed "semantics" of C++.

Reply Parent Score: 2

Timmmm Member since:
2006-07-25

The fact that it has garbage collection built-in is nice as well.


That's one of the things keeping me sticking with C++. Garbage collection is an ugly and unsatisfying solution to a minor problem.

I think a better solution is judicious use of reference counting & shallow copying. Then you get to keep speed, determinism, smoothness (no stopping the world), and deterministic destruction (for RAII).

Reply Parent Score: 5

ebasconp Member since:
2006-05-09

Completely agree.

One friend told me something like: "You do not need garbage collection if you do not produce garbage!"... really true!!

Reply Parent Score: 2

Alfman Member since:
2011-01-28

Timmmm,

"That's one of the things keeping me sticking with C++. Garbage collection is an ugly and unsatisfying solution to a minor problem."


I think it's more a matter of opinion.

The problem with delete in a managed language is that the language can no longer vouch for program safeness with regards to preventing code from corrupting it's own structures. Deleting an object which is still in use could cause stray pointers/references.

With this in mind, does your aversion to garbage collection (and implicitly managed languages) carry over to environments like Perl/PHP/javascript for web development? I think using unmanaged C/C++ would be rather dangerous.



"I think a better solution is judicious use of reference counting & shallow copying. Then you get to keep speed, determinism, smoothness (no stopping the world), and deterministic destruction (for RAII)."


It's tempting to think so, but it's not safe to assume that malloc/free is always going to be faster than GC. There are alot of factors, it came up not long ago:

http://www.osnews.com/comments/24843

Are you thinking that the language ought to enforce reference counting on objects or just that programmers should use it as a design pattern?

One issue with ref counting is cyclic data structures. Though it may be uncommon, I'd hate for any language to be limited in this fashion: Visual basic used ref counting and was susceptible to memory leaks in cyclic structures.

I personally don't have any problem using new/delete myself, but I don't have any serious objections to managed memory if it helps devs produce more reliable code.

Edited 2011-06-18 03:45 UTC

Reply Parent Score: 2