I’m not really involved in javascript land so im parroting off of what i’ve heard for “why js over ts?”
it reduces file size since you no longer need to ship source maps
ctrl+clicking stuff will take you to the definition rather than an unhelpful type declaration
if you spot a bug in the library, you can edit the source directly than having to recompile/reimport
ts adds some unnecessary type “gymnastics” (can’t speak for what this means), when all they really want is intellisense thru jsdoc
So mainly: devs who don’t prefer strongly typed languages, and library devs who find typescript to be less transparent and more time consuming for new and old contributors than it’s worth
Why do you have to ship a source map? It compiles to vanilla js
Not sure what editor, but in neovim (which uses tsserver on my end for LSP) I can either jump to the type declaration or the actual implementation. This is a tooling problem not inherent to typescript
This doesn’t make any sense. You’d have the same problem with minified js or css etc.
It means they are forced to use types properly and do the tiniest bit of thinking and planning that results in fewer type errors (think undefined variables and properties, etc)
Not a bad summary, but I take issue with all the points
Edit: The sourcemap comment is relevant to package size and not to final bundle size per the HN comment linked below. Also, the cmd+click critique rings truer now that I know it’s in the context of an installed package. Another critique is build time which is fair enough.
Thanks :) I didn’t see anyone mention the points made by the svelte guys https://news.ycombinator.com/item?id=35892250 which is a shame since I thought they made better points than the dramatic “type gymnastics” argument haha (i am biased toward type-safety, as long as there is idiomatic, algebraic data types w/ pattern matching)
Overall it sounds like a major change with a few minor/moderate benefits, but it’s their choice and time will tell if it was worth it :P
I’m not really involved in javascript land so im parroting off of what i’ve heard for “why js over ts?”
So mainly: devs who don’t prefer strongly typed languages, and library devs who find typescript to be less transparent and more time consuming for new and old contributors than it’s worth
Not a bad summary, but I take issue with all the points
Edit: The sourcemap comment is relevant to package size and not to final bundle size per the HN comment linked below. Also, the cmd+click critique rings truer now that I know it’s in the context of an installed package. Another critique is build time which is fair enough.
Thanks :) I didn’t see anyone mention the points made by the svelte guys https://news.ycombinator.com/item?id=35892250 which is a shame since I thought they made better points than the dramatic “type gymnastics” argument haha (i am biased toward type-safety, as long as there is idiomatic, algebraic data types w/ pattern matching)
Overall it sounds like a major change with a few minor/moderate benefits, but it’s their choice and time will tell if it was worth it :P