D, Java? To D or not to D?

Guest Lester at ewam-associates.com
Fri Jan 5 02:49:55 PST 2007


TPJ Wrote:

> I decided to start with a simple statement: with this post I don't intend to
> start any flamewar. I'm definitely not a Java zealot, OS zealot, I'm not a
> zealot at all. I'm just a programmer who seeks for future technologies today.
> I'm doing it because I find investing in future technologies today very
> profitable. Of course only in case of really good technologies...
> 
> I'm a freelancer programmer. I work under a GNU/Linux box and I'm interested
> in development of portable desktop apps (*nices, Windows, MacOSX, perhaps
> other OSes in the future) and games (the same OSes, plus mobile phones).
> 
> A few years ago I switched from C/C++ to Python. The reason was simple: I was
> fed up with low-level development in C/C++, and I was impressed by high-level
> development in Python. All I did in C/C++ could be done in Python with one
> significant difference: code was written much, much faster.
> 
> Now, after several years of using Python, I decided to switch from Python to
> Java. The reason is simple. Sometimes Python is too slow for my needs. Of
> course, I can use C in those cases. But using C means using another language
> and development becomes more complicated. In fact, I started to use Pyrex as
> well... Three different tools, no documentation standard for all of them...
> The hell.
> 
> Why Java? Because of many reasons:
> 
> a) Java programs are run by JVM. IMO it's a big advantage: the only thing I
> have to do is to "compile" my app on my development box, and then I can ship
> it without any changes for any OS with JVM.
> 
> b) I can write everything in Java. No need to use other languages and various
> tools. It means easier development.
> 
> c) Static typing. No more dynamic typing hell known from Python. (Dynamic
> typing is great in small scripts, but it becomes error-prone in more complex
> projects. At least in my own case.)
> 
> d) Java programs run fast enough. Take a look at
> http://shootout.alioth.debian.org/gp4sandbox/benchmark.php?test=all&lang=all
> D got 67.6, and Java got 44.0. From MPOV this difference is not important. The
> difference between Java (44.0) and Python (10.1) is much more significant.
> 67.6 / 44.0 = 1.54
> 44.0 / 10.1 = 4.36
> 67.6 / 10.1 = 6.69
> 
> e) Java is very popular. It makes Java programs easier to port. I intend to
> write desktop apps for *nices, Windows and MacOSX systems, as well as some
> games (2D only!!!) for those systems and mobile devices. In my opinion Java is
> a good choice.
> 
> f) I don't care about memory. I can run Eclipse on my old Celeron 800 MHz +
> 256 MB RAM machine, and it just works.
> 
> g) There are great IDEs for Java. I use Eclipse, but NetBeans is also said to
> be a good one.
> 
> 
> And now I have found D. What can I say about it?
> 
> Disadvantages:
> 
> 1) In order to run a program written in D I have to compile it on the target OS.
> 
> 2) D might be perceived as an alternative to Java or C# (I don't count C/C++).
> But it is really the case? Java was born in 1995, today it's a very known
> language. C# was born in 1999, today it's popularity is still rising. And D?
> Mars was born in 1988, D in 1999. How many people have heard about D? In
> comparison, say, to C#? How many apps and libraries are written in Java, in
> C#, and in D?
> 
> 3) There is no D for mobile phones (AFAIK).
> 
> Advantages:
> 
> 1) It's said to be faster than Java. But is it really an advantage? I find
> Java fast enough for my needs, so why should I bother myself with D?
> 
> 2) From FAQ: Since D can call C functions, any GUI library with a C interface
> is accessible from D.
> Does it mean that I can access *any* C library from D? If so, it a great feature!
> 
> 
> So I ask myself a question today: should I invest in learning D? Is it worth
> my efforts?
> 
> To be honest, I still think that C# has better future than D.
> 
> Why I ask all those questions, you may ask. Well - the truth is that:
> 1) I know Java.
> 2) I don't know C#.
> 3) I don't know D.
> 4) I might be wrong.
> 
> Therefore I post this message here. I'd like to know what you (the people who
> know D) say about it.





I've heard D can run on Nokia phones.  I also believe D has a better future than C# because it supports more OSes than it.  C# can't run on Win95 because managed apps only run on Win9x to Win Vista(and future win versions).  Most of the implementations of C# do not comply to the standard and add stuff to it.  Mono and VisualC# are the best but Mono don't do 2.0 and Visual C# adds to many extensions that make it impossible to compile it on mono at times.  Visual C# is the best as the .NET Platform with it is best supported and has 2.0 and 3.0 versions and is almost as fast as most C++ apps.  It was what I used before I started using D.  Even now the only thing I love about it is the easiness of writiing GUIs for windows.  I can hook it up to any DLL and it is still my main GUI app system.  I have found alternatives and D and am Switching to them.  Only real reason to use C# is for Win Vista apps since native apps run in a very suspicious box.  

I love D for its simple syntax and support of everything C/C++ offered before I switched to C#.  C# don't even barely have templates.  I recomend D for all apps including GUIs even though I still basically use C# for that.  I just haven't taken the time to learn any GUI package for D and the one I used to use aint compatible with v1.0.

SO there u have it.  My thoughts on D exactly.  It's one of the best programming languages invented



More information about the Digitalmars-d mailing list