D vs Java

Georg Wrede georg.wrede at nospam.org
Tue Mar 21 03:38:53 PST 2006


Anders F Björklund wrote:
> Georg Wrede wrote:
> 
>> Hmm. Compared with D "Hello World", I'm getting worried.
> 
> 
> D programs are bigger than C and Java, but smaller than C++ ?
> Here are some old Hello test results I had: (on Mac OS X 10.3)
> 
> 31b     hello.sh (script)
> Hello, World!
>         0.01 real         0.00 user         0.00 sys
> 
>  12K    hello_c (executable)
> Hello, World!
>         0.03 real         0.00 user         0.00 sys
> 
> 368K    hello_cpp (including libstdc++)
> Hello, World!
>         0.09 real         0.00 user         0.02 sys
> 
> 104K    hello_d (including Phobos)
> Hello, World!
>         0.04 real         0.01 user         0.01 sys
> 
> 637b    hello.jar (archive)
> Hello, World!
>         0.66 real         0.38 user         0.19 sys

12k would be my dream for D! Seriously.

I think we'll get a lot smaller executables once 1.0 has been out for 
some time and we get down to the basic, mundane stuff in development. Or 
Walter does. :-)

> BTW:
> Having a programming language that needs separate compilation
> as a first language is pretty mean I think. But that's just me.

The 5 years I taught CS made me a firm believer in how immensely 
important the choice of the first language to teach really is. The 
things in that language stick with you for the rest of your life, no 
matter how many others you learn after it.

> (better to go with a scripting language, such as Ruby or Python ?
> and it avoids having to unlearn things picked up from Pascal...)

They're both excellent languages, but IMHO D is it. I don't dare to 
elaborate on this, it would just become an enormous OT-thread here.

> But I learned Pascal in school, and Ada in university. Hated both. :)
> I think you need to learn at least three languages. Preferrably more.

Oh yes! Definitely.



More information about the Digitalmars-d mailing list