Using D

Bruno Medeiros via Digitalmars-d digitalmars-d at puremagic.com
Thu Sep 4 07:19:01 PDT 2014


On 26/08/2014 09:46, Chris wrote:
> 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.

The promise of "Write once run everywhere" is still pretty much accurate 
if you stick to core Java code and libraries. Of course once you start 
using OS/implementation specific code you will have to code more 
carefully, and are more likely to encounter cross-platform problems. 
That's just the nature of things, you can't say it's a failure of Java.
It's like coding in D using lots of malloc/free in your code, and then 
when your program breaks, you complain that "the D GC doesn't work!". Of 
course the GC only is only guaranteed to work if you stick to GC-managed 
memory.

To be honest I smell a load of Java-biased *BS* here, especially because 
of this sentence:
"Instead, I learned D which I can compile and run on each platform 
without a problem."

Actually virtually all other languages, including D, are just as bad as 
Java (if not worse) in the aspects mentioned above. For example, if you 
write code which heavily interacts with the filesystem, you are bound to 
encounter platform/OS-specific problems no matter what language. I'd bet 
money those "even simple things like deleting files", you'd have in D as 
well. At least in Java the APIs they are usually careful to specify 
which aspects of behavior are implementation-specific.

In other cases, such as the sound library or accessibility library, most 
other cross-platform language don't even have those!, so how can you be 
saying that D runs better on each platform that Java?..
(Does a non-existent library run perfectly on every conceivable 
platform? one could say yes...)

-- 
Bruno Medeiros
https://twitter.com/brunodomedeiros


More information about the Digitalmars-d mailing list