Hacker News new | ask | show | jobs
by hacknat 3562 days ago
JavaScript was the first language that I learned, and I really got to know it. I could tell you the ins and outs of prototypal inheritance, how function declarations are hoisted, but expressions are not, how the only scope creator is a function, variable declarations are hoisted, etc.

I don't hate JavaScript, but I do dislike it. After advancing in my career and becoming a back end engineer I strongly prefer the type-safety of strongly typed, typically compiled, languages.

I've worked in large dynamically typed code bases and I've worked in large strongly typed code bases. I have loathed every refactor I have had to do in dynamically typed languages. I just did a big one for a Python code base and I caught more issues and dependencies using grep and emacs than using the IDE and PyCharm. I have about 25 sizeable unit tests for this code base just to check flow control and dumb things like typos. I wouldn't need these unit tests in a compiled language.

JavaScript is the most popular language in the world. It's going to get a lot of hate and love. You contend that it gets disproportionate hate compared to Python and Ruby, but I disagree. I dislike all dynamically typed languages (save bash), and I think many people feel the same way. I honestly fail to see what they buy me.

If it's short and sweet I'll do it in bash, if it's any longer than what bash can handle I'll write the few extra lines of code in Go, for its safety and performance.

If I have to write browser code, I sigh and get on with my life.

1 comments

There are several languages that compile to javascript that are worth checking out: Dart or Typescript would be worth looking into (Coffeescript is probably the most famous example, but doesn't sound like what you're looking for)