40 ms·
And then new transpiler language appears, with "real" type system, not java-grade. And everyone stops using typescript, treating it as outdated technology.
by ungzd 11y ago
And then new transpiler language appears, with "real" type system, not java-grade. And everyone stops using typescript, treating it as outdated technology.
- tommyd 11y agoYou may or not be right, but Typescript seems to be gaining a reasonable amount of attention and traction outside Microsoft, so I suspect its type system may be "good enough" to add a decent degree of type safety while still staying close enough (for better or for worse) to vanilla Javascript that developers, CTOs, etc. aren't put off by the perceived difficulty/risk of a totally new language (also I guess the Microsoft backing counts for something). There are enhancements to the type system on the roadmap, for example support for non-nullable and variadic types: https://github.com/Microsoft/TypeScript/wiki/Roadmap https://github.com/Microsoft/TypeScript/wiki/Roadmap Typescript may not be perfect but I'm glad to see it getting more attention as I think it can bring a significant quality improvement to a code base for a fairly small investment of effort.
- bodhi 11y agoIt already appeared, and is called Purescript. It's great, and it's about as likely to gain traction as Haskell.
- kachnuv_ocasek 11y ago>it's about as likely to gain traction as Haskell So rather unlikely? Haskell has a JavaScript compiler as well, by the way (GHCJS).
- MadcapJake 11y ago> So rather unlikely? He means it already exists and hasn't overtaken TypeScript's popularity.
- sotojuan 11y agoIf there's any Haskell-ish JS language that will gain traction, it's Elm.
- bryanlarsen 11y agoOne major point of the article is that if such a language appears, the existence of your .d.ts file will make the transition to the new language much easier.
- jessegreathouse 11y agoEvery 6 months
- crusso 11y agoAt that point, you can always transpile from Typescript to javascript or maybe even from Typescript to the new language.
- lmm 11y agoBut the typescript type definitions will still be useful. See e.g. https://github.com/sjrd/scala-js-ts-importer https://github.com/sjrd/scala-js-ts-importer
- maxaf 11y agoAre you arguing in favor of everyone sticking to the lowest common denominator technology just because the pace of change is too quick? I would wager that things are changing so much exactly because of this reluctance to adopt new developments at scale. It's a vicious cycle, to be sure, but plain vanilla JavaScript everywhere can't possibly be the savior!
- dceddia 11y agoI don't see the point made often, but I think that "Java-grade" is what a lot of developers (the backend ones) actually want. Or, rather, they'd prefer if JavaScript morphed into something closer to Java. I suspect many of the strong supporters of TypeScript come from Java/C# and just want plain JavaScript to be abstracted away. I've gotta say that one of my main fears with TypeScript is the potential proliferation of code written in heavy OO-style where everything is a Factory or Service or Interface or Impl. And that scares the hell out of me. I know that TypeScript does not mandate code be written that way. Neither does Java. But TypeScript makes it easier for the Java devs to carry over their heavy-OO habits rather than learning a lighter way of writing code, and that's my worry with it.
- MadcapJake 11y ago> not java-grade If people hate TypeScript like they hate Java, then it's probably going to become the standard.