by WoodenChair · 12y ago · 0 comments
---it's an online book that lets you run code right in the book
---it's the language of the REPL that everyone has access to (in the browser)
---js is dynamically typed, which I think is easier for people to grok (I learned Java first, and for months I was puzzled by this "public static void main (String args[])" that I had to start everything with. Public? static? main? void? JS has none of these, and while it's debatable whether that's a good thing or a bad thing, it's an unqualified good thing when first learning to code.)
My main point is that in my opinion books, interactive or not, are still the best source for learning to program for many, if not most new programmers.
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.
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.
BTW: Don't all C based apps begin with a call to main (all Mac / iOS apps):
int main(int argc, const char * argv[])