4 ms·
I feel like it’s going to be an inevitable language update to allow that syntax. I’m surprised TypeScript hasn’t succumbed to the pressure to support that synta
by ComputerGuru 2y ago
I feel like it’s going to be an inevitable language update to allow that syntax. I’m surprised TypeScript hasn’t succumbed to the pressure to support that syntax, but they’re really strict about where they allow deviations from the JS superset.
- jeswin 2y ago> I’m surprised TypeScript hasn’t succumbed to the pressure to support that syntax They won't do this without consensus in TC39. They shouldn't either; that'd be worse than this niggle.
- ComputerGuru 2y agoWhether they should or not and whether that would be bad or not depends on how close of a relationship you believe should/does exist between TypeScript and JavaScript l, specifically in the TS to JS direction. If I said language foo that isn’t TS but transpiled to JS all the same was considering that syntax, people might have a different opinion.
- WorldMaker 2y agoSince Typescript 1.0 it has mostly taken the path of wanting to follow TC-39's standards rather than lead them. The most notable exception was an experimental flag for decorators at too early of a stage that's currently playing out in a compatibility war between the too many projects depending on the experimental flag in Production builds versus the actually standardized behavior. Between that and some remaining warts from <1.0 mistakes/incorrect assumptions, there's plenty of evidence that it is a good thing that other than its type system TS focuses on following standards rather than trying to lead them. There's a place for the language "foos" that want to lead and champion new standards. As an ecosystem we all seem to benefit from Typescript not being that language (anymore, mostly not since 1.0 with the few obvious mistakes aside). It's a part of what makes Typescript trustworthy as Production tooling. It's also what helps make Typescript mostly "cheap" and "unextraordinary" in Production build pipelines.
- pjmlp 2y agoThis was a great decision, and what distinguishes Typescripts from other guest languages, by constraining themselves with being a linter and compiler, it is the same world. Not a two world reality where the guest language has its own mini-platform and tooling, on top of the actual platform.
- afiori 2y agoIt is not that big of a deal, you can write import {} from "some/package" And then go back with working autocompletion
- pjmlp 2y agoTypescript devs acknowledged that one reason of its success is being a linter for JavaScript and little else, hence why they no longer do language level experiements outside the type system.