Hacker News new | ask | show | jobs
by pswilson14 4192 days ago
JavaScript is only unpredictable if written by a poor developer. It's just a language, and it is as powerful as you are. Weakly typed languages are not hacky - merely different.
2 comments

*dynamically typed.

Unless you really mean weakly typed (e.g. "1" + 2 = "12" vs "1" + 2 raises TypeError). In which case I'd say that that's one of JavaScript's (pardon the pun) weaker points.

Disclosure: I like JS. Its weak typing can still be annoying (although you can avoid a lot of it by using strict comparisons).

Weak typing is fine, and even beneficial for small scripts - what javascript was originally meant for. It does not scale though. It leads to large projects becoming unpredictable, unwieldy and mired in technical debt.
Yeah the lack of any successful JS rich Web apps proves this point.

Wait, what....

A poor programming language does not entirely preclude the possibility of a successful app, it just makes it a lot more difficult to release a stable one.

For companies that can throw huge resources at their apps (e.g. google) the language deficiencies do not matter as much because they can be dealt with with extra work and testing.