3 ms·
We don't use it because we found it to be too brittle. The type system is really bolted on. We've hit super weird bugs, in the compiler. And any kind of preproc
by j-pb 5y ago
We don't use it because we found it to be too brittle. The type system is really bolted on. We've hit super weird bugs, in the compiler. And any kind of preprocessing/compilation introduces layers that make in-process debugging much harder.
If browsers actually spoke a strongly typed functional language a la ML/Haskell natively we'd probably switch in a heartbeat. But otherwise it's either vanilla js (no jsx either, simply htm) or Rust compiled to WASM.
And we'd advocate for its removal because it incurs opportunity costs.
The deno team is small enough as is, and we don't think that TS is a selling point for it.
The great tooling it provides is however so we'd rather see more of that.
- brundolf 5y agoTypeScript support is Deno's main selling point for many people. That was the headlining feature, that's the first thing most people know about it, and I think that's the only reason it's gotten significant traction. The other stuff has value, but it's a huge thing to ask an entire ecosystem to pack up shop and move. You have to offer more than just incremental improvements to performance, tooling, and permissions-management. You have to offer a paradigm-shift. I think Deno would be dead in the water if it didn't offer TypeScript as a first-class citizen, despite all the other ways it improves on Node. As for the type system itself: it is bolted on, yes, and I don't think that's a weakness. Flow tried to be a JS type system that wasn't bolted-on, and it was horrible to use because it was constantly fighting against the base language and all of its idioms. TypeScript is empathetic to JavaScript programmers: it knows things will never be perfect, so it gives you the tools to make them really quite good but gets out of your way when it reaches its limits. I think this is a wonderful thing and a huge driver of its success. Don't let perfect be the enemy of good.
- j-pb 5y agoYou act as if the typescript compiler and source-maps suddenly stopped working once they're out of the core. I think you're hugely underselling the value that deno provides as a tool and attribute too much virtue to TS. Maybe the advertisement for deno had it backwards. If people knew how much better it is than node, it'd gain significantly more traction. Instead they just think it's "that typescript" thing and ignore it. If deno dies it's probably because of that typescript shadow, not despite of it.
- brundolf 5y ago> Instead they just think it's "that typescript" thing and itgnore it. Iff deno dies it's probably because of that typescript shadow, not despite of it. I don't know what planet you're living on but this is completely backwards from everything I've seen people say online. > You act as if the typescript compiler and source-maps suddenly stopped working once they're out of the core. I know that I personally don't bother using TS for Node projects until they reach a certain size. I'd love to use it for every tiny script, but the overhead of setting up a tsconfig, figuring out where the build files will go, adding them to the gitignore if there is one, combining the build step and the run step into a little script for development, etc, just tips the equation. On top of that, I can't really ship TS on NPM because that assumes everyone downstream will be willing to do the same config + build process. Deno solves all of this by making TS a first-class citizen. That's huge.