Hacker News new | ask | show | jobs
by hnriot 4548 days ago
"public static void main (String args[])" - that would put anyone off, and for good reason, it's total bollocks. Either "main" is special or it's not, if it is why tell java stuff it already knows. If the jvm wants to run something that's public and called main and has a method signature of string array then why not dispense with all the nonsense - the answer's simple - it's java - the most verbose boiler-plate laden language out there designed for groups of mediocre developers. Despite needing dozens of lines to even basic stuff, it forces people into some form of homogeneity to keep teams of "java certified" developers in jobs.

if you want to learn to program, open Terminal, type ipython and go from there. When lost google stackoverflow, repeat. Forget books, there are way better, more up to date online resources.

2 comments

What does Java's supposed verbosity have to do with the comment you replied to about learning JavaScript?

On an unrelated note, main in python is not a whole lot better. By the time you get through __name__ == "__main__", import sys and use sys.argv you're not really winning much over public static void main. The nice thing about python is that you don't have to start worryin about main since you can just run it as a script to start, which is definitely great for beginners, but that doesn't exactly justify the argument you were trying to make about the verbosity of Java.

:0 I mostly agree with this. Java is full of convoluted convention. Today, I would probably start with javascript or Ruby. However, I love that I really got started with ObjC.

BTW: Don't all C based apps begin with a call to main (all Mac / iOS apps):

int main(int argc, const char * argv[])