3 ms·
Instead of TypeScript which is very far from being all-typed, I hope there will be wider adoption for proper Web languages like ReasonML[1], BuckleScript[2], Pu
by xvilka 6y ago
Instead of TypeScript which is very far from being all-typed, I hope there will be wider adoption for proper Web languages like ReasonML[1], BuckleScript[2], PureScript[3], Elm[4], etc. With a better WebAssembly adoption and once they solve the garbage collection problem[5] and direct DOM access[6] there will no even need in JavaScript "glue".
[1] https://reasonml.github.io/ https://reasonml.github.io/
[2] https://bucklescript.github.io/ https://bucklescript.github.io/
[3] https://www.purescript.org/ https://www.purescript.org/
[4] https://elm-lang.org/ https://elm-lang.org/
[5] https://github.com/WebAssembly/gc/issues/44#issuecomment-623912377 https://github.com/WebAssembly/gc/issues/44#issuecomment-623...
[6] https://stackoverflow.com/questions/42628328/wasm-access-dom https://stackoverflow.com/questions/42628328/wasm-access-dom
- Sebb767 6y agoWell, loose typing allows for far faster prototyping. I know some people will debate me on this, but mixing int and string in an array or returning an object or a string is far faster than going the 'proper' way. It's not great, but it gets you started earlier and that's a big point. Another thing is that it's extremely easy to migrate from vanilla JavaScript to Typescript. You simply add a compile step at first, which breaks nothing, and then you slowly move your js files to ts while still being able to cross use them. I've migrated a ~10k LOC app and it was a breeze - whenever I needed to touch a module, I simply took the 5 minutes to make it TS. Whenever I touched a function, I added the type parameter. Being able to slowly convert a big app without ever having a major breakage or a massive change is something extremely valuable and rare (looking at you, `async`).
- arkanciscan 6y agoTypeScript just moves all errors from runtime to compiletime, even the ones nobody would ever realistically encounter. The user's browser is the only typechecker that matters, and that's why end-to-end tests are more important than type-linting.
- arkanciscan 6y agoLol "proper". Type nerds!