Using D

Chris via Digitalmars-d digitalmars-d at puremagic.com
Tue Aug 26 01:46:46 PDT 2014


On Tuesday, 26 August 2014 at 05:58:36 UTC, Walter Bright wrote:
> On 8/25/2014 2:01 AM, Chris wrote:
>> The main thing that put me off Java was not so much the fact 
>> that you're
>> restricted to OOP and that it's verbose etc., but that it 
>> caused all sorts of
>> problems when shipping the actual programs. "Write once run 
>> everywhere" is a
>> myth, if you ask me. D is much closer to that than Java. In 
>> the end we
>> encountered so many problems that I dumped Java for cross 
>> platform development
>> (and for development in general). Nobody in the Java world 
>> ever talks about
>> this, but cross platform doesn't really work (apart from 
>> running simple programs).
>
> I haven't ported much Java code, but I have found D code to be 
> significantly easier to port than C++.
>
> The varying sizes of basic types in C++ is what causes most of 
> the problems.

The problem was that Java didn't behave as expected on Windows. 
Things that worked fine on Linux and OS X didn't work on Windows 
(even simple things like deleting files). User reported all sorts 
of problems, one of them being that the Java Access Bridge didn't 
work. Why, nobody knows. The lack of a proper sound API / 
library. Then there was the versioning hell with JRE/JVM and 
having to tell users what version they had to download (the non 
tech savvy crowd). I know that MS doesn't make it easy for Java 
either. Well, I could have sorted the problems out with Java web 
start, SWT and all that kind of stuff. Instead, I learned D which 
I can compile and run on each platform without a problem.

In my opinion, if a technology like Java needs so many crutches 
to make it work on different platforms, then it's useless for 
cross-platform development. Also, once you need interaction with 
the system or other (native) applications, then it becomes 
frustrating pretty soon. D solved all these problems for me and 
more, in fact it helped me to design a better product, because it 
opened doors for me as regards both programming patterns and 
interaction with the system and various libraries. That there are 
other languages with which I could have achieved similar things, 
I do not doubt. But I do doubt that it would have been so easy, 
and the fact that new languages that aim for what D already 
stands for are still being invented (cf. Nimrod) shows that 
existing mainstream technologies like Java, C++, C# don't meet 
programmers' demands yet.


More information about the Digitalmars-d mailing list