Is it reasonable to learn D
Timon Gehr
timon.gehr at gmx.ch
Tue Jun 7 13:45:07 PDT 2011
Fabian wrote:
> Dear D Community,
> is it reasonable to learn D?
> I've found a lot of good points for D but I've found a lot of negative
> points too. I believe that I needn't to list all the point for D but I
> want to give a few examples against learning D I've read in some German
> and English boards:
>
> - The D compiler has only bad code optimization
It is not very bad, but does not match the sophisticatedness of modern C++
compilers. I think the optimizations on integer arithmetics are quite okay, but
unfortunately the compiler cannot create floating point register variables.
You can always resort to inline assembly/link in C or C++ if some part of your
code is very performance-critical.
D code can already outperform C++ code on similar tasks if you make smart use of D
features. (without making your code ugly or unmaintainable).
But it is true that this could be improved. (To the point where a D compiler could
make MORE optimizations than C++, because it has immutable and pure).
> - There are no maintained GUI libraries
I don't know about this but I think QtD and DWT are still being maintained?
Also, D is fully binary compatible with C/(C++) You can also do your GUI
programming in C or C++ and use D for some program logic until the situation improves.
> - The development of the compiler is very slow
Have a look at the last changelog. The development is not lightning fast but quite
steady.
Also keep in mind that there is no big company behind D, all the compiler
development is basically volunteering work.
> - Only a small community
> => no real German community
The community does not grow if people stay away because it is small. ;)
*I* speak German btw.
>
> So I ask you - Is it reasonable to learn D?
> I'm looking forward to your answers.
>
> Greetings Fabian
>
> PS: If you want to contact me you are allowed to write an Email to me.
> contact-fab at freemail.de
I think it is very reasonable. But it depends on what you want to use it for.
There are already companies out there that use D.
If you have some time to spend, it is certainly valuable. D has some very nice
design decisions.
The _language_ itself is imho superior to the alternatives. Where D is arguably
somewhat lacking (as you have already figured out.) is support/native libraries.
It does make up some of that by being easily linkable with C libraries, but you
often will have to write the bindings yourself.
But again that does not get better if people don't learn D because of lack of
support or native libraries.
There are also some upsides to a language being less mature: You can still submit
patches and get some of your very own code into the reference compiler
implementation! ;)
Timon
More information about the Digitalmars-d-learn
mailing list