3 ms·
I hope they stick to these useful helper functions instead of adding more complexity like Type Annotations that provide no type soundness or runtime checks of a
by Vt71fcAqt7 3y ago
I hope they stick to these useful helper functions instead of adding more complexity like Type Annotations that provide no type soundness or runtime checks of any kind[0]
[0] https://github.com/tc39/proposal-type-annotations https://github.com/tc39/proposal-type-annotations
- wffurr 3y agoThat’s an interesting take when the stated purpose of that proposal is “to enable developers to run programs written in TypeScript, Flow, and other static typing supersets of JavaScript without any need for transpilation”. That seems like a fine goal. Allow runtimes to execute JS with type annotations as-is.
- Vt71fcAqt7 3y agoThe issue for me is four-fold: 1. Adds complexity to the language 2. Adds complexity to engines 3. Adds complexity to developers, especially new developers ("wait is it typed or not") 4. Most importantly, all but guaranties we will never have true types in JavaScript for things that could benefit from it like node or electron where instant compile time isn't necessary. All this for a feature only helping some developers some of the time so they can run code that will be stripped out in production to reduce size anyway on their local browser a bit more easily.