|
| ▲ | hmry a day ago | parent | next [-] |
| The fact that you have to explain what classes are, and what static methods are, a huge load of information, for a hello world program. And what's worse, it will leave students rightly confused about what the point of the class is, if it only has static members... Making it more likely they don't retain any of the information. Or alternatively, just say "type it exactly like this, don't think about what the magic words mean" which is a great way to ruin programming for people |
|
| ▲ | maxlybbert a day ago | parent | prev | next [-] |
| The first book I read on Java managed to explain "public static void main(String[] args)" by the end of the first chapter. It wasn't a long chapter, either. I don't like Java, and the excessive boilerplate is a big part of that opinion. But it was never nearly as arcane as some people here are making it. |
|
| ▲ | antonvs a day ago | parent | prev | next [-] |
| When you first learn programming, you don't know what a class is, or a method, let alone a static method. But if you teach people using Java, you have to teach them to write this: public class Main {
public static void main(String[] args) {
System.out.println("Hello world");
}
}
...instead of just: print "Hello world"
The latter is easy for a student to understand. With the former, you just have to tell them to use it without understanding it, and that they'll understand it later. |
|
| ▲ | GaggiX a day ago | parent | prev [-] |
| Why there is a class in the first place |