D vs Java as a first programming language

Nicolas Sicard dransic at free.fr
Mon Sep 29 10:05:27 PDT 2008


Jarrett Billingsley a écrit :
> On Sun, Sep 28, 2008 at 8:03 AM, Nicolas Sicard <dransic at free.fr> wrote:
>
>   
>> 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's funny you mention this because I had this exact experience last
> year.  I worked as a student helper at my university, where students
> from classes I had already taken could come and ask questions about
> things they didn't understand and assignments they were doing.  For
> some reason, the simplest introductory programming course at my
> university is taught in Java.  And every week, there'd be at _least_
> two people asking me why we had to put the "public static void
> main(String[] args)", why variables had to be declared before use, why
> they had to compile and then run etc.  And these same people had
> problems grasping concepts of what a string was and that numbers were
> not infinitely precise.  It seems like throwing all this OO junk at
> people from the outset is way too much information at one time.
>   

Well, I have also experienced that curly braces, and specifically 
visualizing their nesting levels, is a hard thing for some of the novice 
programmers. Pascal's begin/end were a lot more expressive. Maybe 
Python's syntax is more beginner-friendly.
So OO is not for tomorrow ! :-)




More information about the Digitalmars-d mailing list