Jump to page: 1 27  
Page
Thread overview
D, Java? To D or not to D?
Jan 05, 2007
TPJ
Jan 05, 2007
Guest
Native apps on Vista (was Re: D, Java? To D or not to D?)
Jan 05, 2007
Carlos Santander
Jan 05, 2007
Sean Kelly
Jan 06, 2007
Carlos Santander
Jan 05, 2007
Guest
Jan 08, 2007
Don Clugston
Jan 05, 2007
Guest
Jan 06, 2007
Carlos Santander
Jan 05, 2007
Boris Kolar
Jan 05, 2007
Kyle Furlong
Jan 05, 2007
janderson
Jan 05, 2007
Alexander Panek
Jan 05, 2007
Frits van Bommel
Jan 05, 2007
Georg Wrede
Jan 05, 2007
Dave
Jan 05, 2007
bobef
Jan 05, 2007
Leandro Lucarella
Jan 05, 2007
Waldemar
Jan 05, 2007
mike
Jan 05, 2007
Don Clugston
Jan 05, 2007
Paulo Herrera
Jan 07, 2007
Bruno Medeiros
Jan 05, 2007
Sean Kelly
Jan 05, 2007
BCS
Jan 05, 2007
Walter Bright
Jan 05, 2007
Waldemar
Jan 05, 2007
Walter Bright
Jan 05, 2007
Leandro Lucarella
Jan 07, 2007
Bruno Medeiros
Jan 05, 2007
Walter Bright
Jan 05, 2007
Sean Kelly
Jan 06, 2007
Walter Bright
Jan 06, 2007
Kyle Furlong
Jan 06, 2007
Walter Bright
Jan 06, 2007
Jeff Nowakowski
Jan 06, 2007
Walter Bright
Jan 09, 2007
Pragma
Jan 05, 2007
Frits van Bommel
Jan 05, 2007
Sean Kelly
Jan 06, 2007
Frits van Bommel
Jan 06, 2007
Sean Kelly
Jan 06, 2007
Frits van Bommel
Jan 06, 2007
Sean Kelly
Jan 06, 2007
Daniel Keep
Jan 06, 2007
Frits van Bommel
Jan 06, 2007
Frits van Bommel
Jan 07, 2007
Daniel Keep
Jan 07, 2007
Frits van Bommel
Jan 08, 2007
Johan Granberg
Jan 06, 2007
Walter Bright
Jan 06, 2007
Walter Bright
Jan 05, 2007
Georg Wrede
Jan 10, 2007
Don Clugston
Jan 06, 2007
John Reimer
Jan 06, 2007
Daniel Keep
January 05, 2007
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.
January 05, 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
January 05, 2007
My advice: use the best or the most popular language for the platform. Don't bother with "slightly better but less popular" category. So, if you target .NET, use C# (most popular) or Boo/Nemerle (best), don't bother with VB.NET, J# and others.

If you target JVM, use Java (also take a look at Scala - I don't like it too much because it seems more complex than necessary).

If you must have fast startup times, or must integrate with OS API, use
C++ (most popular) or D (best). Maybe Eiffel is also worth considering.
D is not (yet) very good for real-time programming (see all garbage
collection, deterministic finalization threads for reasons), but Walter
will likely fix that soon.

I personally use D for OS-integrated projects and Java for all others.
If Boo for JVM (or native) existed, I would definitely use Boo (I'm almost
tempted to write JVM port of Boo myself).
January 05, 2007
Boris Kolar wrote:
> My advice: use the best or the most popular language for the platform.
> Don't bother with "slightly better but less popular" category. So, if
> you target .NET, use C# (most popular) or Boo/Nemerle (best), don't
> bother with VB.NET, J# and others.
> 
> If you target JVM, use Java (also take a look at Scala - I don't like
> it too much because it seems more complex than necessary).
> 
> If you must have fast startup times, or must integrate with OS API, use
> C++ (most popular) or D (best). Maybe Eiffel is also worth considering.
> D is not (yet) very good for real-time programming (see all garbage
> collection, deterministic finalization threads for reasons), but Walter
> will likely fix that soon.
> 
> I personally use D for OS-integrated projects and Java for all others.
> If Boo for JVM (or native) existed, I would definitely use Boo (I'm almost
> tempted to write JVM port of Boo myself).

Good break down. From the OP's requirements, I dont see what would be enticing about D. Perhaps the clean, natural C-style syntax? Maybe the lack of bloat? How about the contract programming support?

Admittedly, the feature list is not _that_ impressive, the runtime implementation mediocre, libraries not generally very mature, but the people who use it do because it just feels *right*. The whole is logical, cohesive, clean. And not radically different, or horribly obtuse. Maybe even everything that C++ could have and should have been.

If that paragraph didn't make you go, "hmmm!" then maybe D doesn't have anything to offer you. It compiles natively, yes, but that isn't a win for you. Most everything else (tools, libraries) you can get better in Java if you dont mind the VM, and syntax bloat.

That said, things are just getting interesting around here in the library/toolset area. ;-)
January 05, 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...
> 

Always a good approach. :)

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

Seems like you'll like GDC, then..

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

Gregor Richards has found a way to compile D code to JVM compatible programs, that can be run in a JVM. So, if this is taken a bit further, maybe we can even say "D runs in a VM, too, if you want".

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

You can't compare Sun & Microsoft to a one man show (AFAIK) like Digitalmars. Those are other dimensions of marketing and promotion, really.

> 3) There is no D for mobile phones (AFAIK).
> 

There's a guy that tries to get D working on a Nokia 770, I hope he got it working. Apart from that, as D can theoretically be run in a JVM, .. you know the rest.

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

I don't know how the speed advantage over Java is, but there's definitely more room for optimization than with Java. I can't answer you the question why you should bother yourself with D. That's your decision, after all. ;)

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

Yes, any C library. Apart from that, there's a tool to bind C++ libraries, too. (BCDgen on dsource)

> 
> So I ask myself a question today: should I invest in learning D? Is it worth
> my efforts?
> 

Definitely.

> To be honest, I still think that C# has better future than D.
> 

That may be, but that doesn't mean D isn't worth working with - actually it's the other way round.

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

Very honest and nice post, still. :)

Hope that helps, best regards,
Alex
January 05, 2007
TPJ wrote:

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

Yes, it's an advantage (speed and memory). No, you might not need it.

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

Yes, D can call all C libraries that it has an "import module" for.
Generating these is somewhat tedious, but it can be mostly automated.

Unfortunately, most libraries for GUI development are either written
in C++ or use unavailable system libraries which makes using them hard.

> So I ask myself a question today: should I invest in learning D? Is it worth
> my efforts?

Why not ? If you already have a C/C++ and Python background, it
shouldn't be long before you decide whether you like it or not.

> To be honest, I still think that C# has better future than D.

There is room for both. And D is more "up against" C++ than C# ?
Having the GDC->JVM compiler (like Managed C++) would be nice...

--anders
January 05, 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.
> 

You can execute D source-code from the command-line. See the -run switch and (for more capability and executable caching), see http://www.digitalmars.com/d/rdmd.html .

> 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.
January 05, 2007
Once Tiport (or some other similar project) is done D will have all the libraries in the world (C,C++ and Java), some of them even even written in D, not just bindings, and Java is out of the game ;)
January 05, 2007
Alexander Panek wrote:
> TPJ wrote:
>> 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.
>>
> 
> Gregor Richards has found a way to compile D code to JVM compatible programs, that can be run in a JVM. So, if this is taken a bit further, maybe we can even say "D runs in a VM, too, if you want".

From what I remember it'll run but it won't be pretty...
IIRC he used GDC to compile to MIPS and then translated that to bytecode, using a huge array to simulate raw memory...
But yeah, if you _need_ it to run on a JVM, this may be an option.
I'm pretty sure he didn't get access to Java classes that way though.

>> 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?
>>
> 
> You can't compare Sun & Microsoft to a one man show (AFAIK) like Digitalmars. Those are other dimensions of marketing and promotion, really.

Yeah, D is much better than Java (never really used C#, so can't compare).
But Java and .NET definitely have a bigger PR department, so it's not surprising they get all the press.

>> 3) There is no D for mobile phones (AFAIK).
>>
> 
> There's a guy that tries to get D working on a Nokia 770, I hope he got it working. Apart from that, as D can theoretically be run in a JVM, .. you know the rest.

He got it working:
Photo: http://www.flickr.com/photos/michaeldominic/329290303/
Coverage:
http://dblog.aldacron.net/2006/12/22/d-gets-nokiafied/
http://pvanhoof.be/blog/index.php/2006/12/22/d-on-the-nokia-770

>> 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?
>>
> 
> I don't know how the speed advantage over Java is, but there's definitely more room for optimization than with Java. I can't answer you the question why you should bother yourself with D. That's your decision, after all. ;)

FWIW: http://shootout.alioth.debian.org/gp4/benchmark.php?test=all&lang=dlang&lang2=java

>> 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!
>>
> 
> Yes, any C library. Apart from that, there's a tool to bind C++ libraries, too. (BCDgen on dsource)

You need to convert C headers to D import modules to use them though.
It shouldn't be too hard unless too much preprocessor tricks are used, but it might be a bit of work for large files.
IIRC there's a tool that at least provides you with a starting point for that, not sure how far along it is these days.

>> 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 definitely prefer D over Java, but I've never written a program that needed to run on multiple operating systems and architectures.
You'll also have to use GDC to compile on anything but x86 Linux & windows, and I don't have much experience with it. Haven't heard much complaints about it though, and the Mac people definitely seem to like it :).
Theoretically it should eventually be portable to all architectures GCC supports, but IIRC it still needs some work in that department.
January 05, 2007
TPJ escribió:
> 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

Have you tried psyco (a kid of JIT for Python)?

> Disadvantages:
> 
> 1) In order to run a program written in D I have to compile it on the target OS.

Gregor Richards managed to get Java Bytecode out of a D source[1] =)
So, that could change in the future if you prefer portability over speed.

[1] http://www.digitalmars.com/d/archives/digitalmars/D/announce/From_the_Department_of_Insane_Ideas_D_on_the_JVM_6264.html

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

Since I doesn't have Sun or Microsoft on his back, it probably will take MUCH longer for D to popularize (like Python or Ruby, did, they both are from early '90 and got popular about 10 years later, even so, it happend almost the same to C++, which didn't had a real bit enterprise either).

> 3) There is no D for mobile phones (AFAIK).

Nokia 770 is not a mobile phone but is close enough (I think). As somebody says, Michael Dominic K.[2] apparently got D working on that internet tablet[3].

[2] http://www.mdk.org.pl/
[3] http://www.flickr.com/photo_zoom.gne?id=329290303&size=l

So, as you can see, or at least as I can see, D has a very prominent future (it's technically possible to make D do everything C/C++, Java and C# can do, picking the best features of each), but I think it would take about 10 to D to get really popular (as popular as C/C++, Java, C# or Python). Maybe a little less, because back when Python or C++ was created there were no so much fuzz about programming languages as there is now (I think), so the terrain is much more fertile for people to try new languages now.

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

Less memory consumption, faster load times, and I think more responsiveness. When you use C/C++/D programs (native code programs) they fill lighter (at least I find them lighter).

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

Yes. But wrappers can make your live much easier.

> So I ask myself a question today: should I invest in learning D? Is it worth
> my efforts?

I think yes. D has everything to success, it just need time. What I found really great of the is how well both worlds (native compiled and higher level with-killer-runtime) are mixed. You have the best of the 2 worlds.

-- 
Leandro Lucarella
Integratech S.A.
4571-5252
« First   ‹ Prev
1 2 3 4 5 6 7