Hacker News new | ask | show | jobs
by rsobers 5055 days ago
The reason I dislike Java is because the barrier to entry is so high for beginners.

  public class HelloWorld {
      public static void main(String[] args) {
          System.out.println("Hello, World");
      }
  }
First, you need to wrestle with Eclipse. Then you need to figure out things like class and void and static and public before you can event print something to the screen. Ugh. So...much...syntax.
4 comments

Compared to Python's

    print('hello world')
Or even HQ9+'s

    H
High school students all over the world are quite happy to write Java code like that without any issues.
No they aren't. It's appalling to me that high schools actually use Java for introducing a subject that requires immersion to be successful. Nobody sees "Hello World" or any other intro app in Java and thinks to themselves, "Hey, wouldn't it be awesome if I spent hours on end making this compiler thingy happy." If students aren't actually making things they can use and play with, you're going to find very little adoption outside of the school-mandated time it takes to pass the next test. This is why Javascript, Ruby, Python, hell, even VB are so important.

1) Make them want to write code 2) Show them how to reason about the code (this is where CS classes should come in)

If it took you hours to get hello world working perhaps you should consider going back to school?
Well, to be fair there are different concepts at work here and I agree, if nobody introduced you to what is going on there with OOP then this might look very arbitrary and bloated but the typical "Hello World" is probably not the best example to compare them like that. When you compare typical plain objects in Python and Java then Java is quite alright IMHO. Let's leave the OOP or no-OOP discussion aside on purpose.

And eclipse is not a pre-requisite to code Java; you get everything you need in the JDK and you best start with that, then it becomes clearer whatever it is your IDE is actually doing for (or against) you...

> So...much...syntax.

Really?!

Then maybe you should consider other profession, as there are other languages out there much more verbose, like Ada for example.

Just because there are more verbose languages, it doesn't take away from how verbose Java is.