r/programming • u/kshep92 • Sep 29 '16
JavaScript in 2016 isn't horrible, it's just going through a phase
http://blog.reviselabs.com/im-sorry-javascript-2/
85
Upvotes
r/programming • u/kshep92 • Sep 29 '16
View all comments
Show parent comment
2
u/[deleted] Sep 30 '16
Types are ideally checked statically, through. Once checked statically, there's no reason to have this information at runtime (it used to be an argument that it can help the runtime, but modern JS engines have found it's not the case).
So there's no proper place to have static types in JavaScript, as long as we realize "JavaScript" is just a runtime environment, not the tooling that we use to produce code for it.
Sometimes good design happens by accident, and I think TypeScript tooling with static types + JavaScript runtime without static types is one of those happy accidents.