An interesting and provocative post.
Dan Vanderkam

  1. All of the current major JavaScript engines are “sufficiently advanced” compilers which make JavaScript almost as fast as native code (within 1–2x the performance of C code). JavaScript shares a lot of LISP’s dynamic features (still missing macros unless you count sweet.js).
  2. Yeah, static analysis does have some actual, real advantages. But TypeScript doesn’t really go all the way here, either. Lots of people use <any> to bridge with libraries, or just let libraries remain weird untyped strange lands. In which case, you’re in the same boat even using TypeScript.
  3. Static analysis also has some actual, real disadvantages. For example, more expressive dependent types are trivial to express with runtime type checkers (stuff like predicate literals, regular expressions for advanced string subtypes, etc… we have the full expressive power of the JS language to validate types). Giving that much expressive power to a static type system can make type correctness unprovable at compile time.
One clap, two clap, three clap, forty?

By clapping more or less, you can signal to us which stories really stand out.