by aikah · 11y ago · 0 comments
NodeJs doesn't have any concurrency capability. Sure you can fork, but then you need a message queue for interprocess communication. And frankly while javascript's getting better, some people are a bit sick of dynamically typed languages and prefer static typed languages.
How many people can go read a large JS source file and make sense of what is happening quickly? not a lot, in comparison, Go is easy to read,there is no "ninja trick" or metaprogramming stunts that makes code unreadable.
If written correctly, neither of those questions should be an issue.
1) JS devs shouldn't have "large" JavaScript source files, like most good programs, they should be broken into small, concise pieces.
2) JS devs shouldn't use "ninja tricks" or other BS, they should write for the next person that reads the code, again, like any language.
Yes, a lot of people still write bad JavaScript, but that is on them, not the language. It is pretty simple to write bery readable JavaScript if you so choose.
1) Breaking JS up into small files actually makes it less readable because then you have to guess at the context that the JS is running in. Without static typing, it's impossible to reason about certain blocks of code without going to find blocks of code that exist in other files and so on...
2) JS devs have to use ninja tricks because without a strong standard library they have to keep reinventing the wheels that should have been included.
There is no standard for how to write readable Javascript and there is too much flexibility. Isaacs, of Node.js fame, writes horribly unreadable code IMO due to the fact that he does not use semi-colons and he tends to put punctuation on the left. However, he swears by the fact that it's more readable...to him.