D vs Java as a first programming language
Nicolas Sicard
dransic at free.fr
Sun Sep 28 05:03:45 PDT 2008
Hi,
I am new to D, and I think I have discovered a programming language
close to my ideal one...
On the web site, it is said: "Who D is Not For [...] As a first
programming language - [...] Java is more suitable for beginners.".
Is this based on experience?
I am a teacher in a field where my students don't know what a
programming language is! I need a language for a first approach of
programming. I would say that Pascal, or BASIC even if a bit outdated,
or even D would fit, but not Java.
I can imagine my first lesson with Java:
public class HelloWorld {
public static void main(String[] args) {
System.out.print("Hello world!");
}
}
I would have to explain what a class is. What a method is. What a public
or private visibility means. What a static method is. What the dots in
"System.out.print" mean... :) Then how to compile it. Why you can't run
it without a virtual machine. A virtual what?
It seems the main argument why Java is a good first language is that it
lacks complexity (namely C++ complexity). I think it also lacks
simplicity for absolute beginners. D can be both simple and complex, and
it shares other features with Java that could make it a language for
beginners: object-oriented, no pointers necessary, garbage collection,
strict type checking, portable...
What feature would make D a worse choice than Java for a first language?
Nicolas
More information about the Digitalmars-d
mailing list