Switching from Java to D: Beginner questions, multiplatform issues, etc.
John Colvin
john.loughran.colvin at gmail.com
Thu Feb 27 02:52:49 PST 2014
On Thursday, 27 February 2014 at 10:23:40 UTC, DS6 wrote:
> Okay, down to the questions I have about D:
> - Why should I use D over another language? What general
> benefits does it provide me, in relation to the points I made
> about it above? Is it a solid base to build off of, but still
> simple in nature?
It's a flexible, well designed language. Many things that are
complex and/or slow in other languages can be written in a
readable and performant manner, with fewer nasty surprises.
> - How is multiplatform compilation handled by D?
Fine as long as you stick with x86/x86_64 CPUs and a normal
desktop operating system, i.e. Linux, Windows, OS X, ***BSD
Support for other types of systems is work-in-progress, mostly
focused around gdc/ldc as dmd is an x86/x86_64 only compiler.
Bear in mind that the same frontend is used for all 3 compilers,
dmd is the reference compiler, gdc/ldc lag 1 release behind dmd.
> - How well supported is D? I've read that D is still
> relatively... Not new, or young, but less known than other
> languages. Does it have support for major libraries, like SDL?
> Aside: Whether or not these libs are "official" or not doesn't
> matter to me, they usually aren't anyway.
You can use any C library from D, but you have to port the
headers. This has been done for many libraries, see here:
http://code.dlang.org/
There are some nice D-style wrappers that exist as well.
Links to other languages include
https://github.com/JakobOvrum/LuaD,
https://bitbucket.org/ariovistus/pyd
C++ libraries are less well supported, but there has been a
certain amount of success.
> - How is D used in the enterprise world?
Depends on your definition of enterprise. There are companies
that use D (http://wiki.dlang.org/Current_D_Use).
> - Lastly, and probably most important, is D code scalable and
> easy to maintain? You never know, something I make could gain
> popularity and I would suddenly need to mass-produce and
> heavily modify my code to suit the needs of whatever crowd of
> people suddenly want my services, whatever services I may
> offer. Is going large-scale from an initially small-scale
> project or otherwise prototype at least comparable, say, Java
> (which is quite easy to manage large-scale if you do things
> right)?
In my opinion, D code is highly scalable and maintainable. In
particular, the strength of D's metaprogramming makes for
flexible code.
Overall, D is a pragmatic language.
More information about the Digitalmars-d-learn
mailing list