Switching from Java to D: Beginner questions, multiplatform issues, etc.

DS6 ds6 at example.com
Thu Feb 27 14:40:35 PST 2014


On Thursday, 27 February 2014 at 10:52:51 UTC, John Colvin wrote:
> 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.

I find I usually run into some "nasty surprises", especially when 
dealing with complex tasks, in Java, having to constantly 
recompile and retest my code. This is a welcomed change.

> Fine as long as you stick with x86/x86_64 CPUs and a normal 
> desktop operating system, i.e. Linux, Windows, OS X, ***BSD

If I ever decide to go multiplatform with my applications, those 
would be all I would target anyway. My code would be open-source 
regardless, so it's not like someone couldn't port it.

> 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.

I've grown up on x86 so other architectures are pretty far in the 
future.

> You can use any C library from D, but you have to port the 
> headers. This has been done for many libraries

What exactly is the difference between C and D headers?
=
> Links to other languages include 
> https://github.com/JakobOvrum/LuaD

That is a _very_ welcomed link. Lua would have to be my favorite 
scripting language to use.
There are numerous Java ports for Lua, but they're much harder to 
develop for than the original C variant.

> Depends on your definition of enterprise. There are companies 
> that use D (http://wiki.dlang.org/Current_D_Use).

Interesting that Facebook uses it, not to mention even such a 
high-scaled company should praise D over C++.

> In my opinion, D code is highly scalable and maintainable. In 
> particular, the strength of D's metaprogramming makes for 
> flexible code.

Metaprogramming is always welcomed; makes things much easier in 
the long run.
I'll probably find this out on my own eventually, but does D 
support operator overloading? That would be simply amazing.

> Overall, D is a pragmatic language.

Thank you for taking the time to answer my questions, I am much 
more interested in D now.


More information about the Digitalmars-d-learn mailing list