I was talking to my manager the other day, discussing the languages we are using at $dayjob. He kind of offhandedly said that he thinks TypeScript is a temporary fad and soon everything will go back to using JavaScript. He doesn’t like that it’s made by Microsoft either.

I’m not a frontend developer so I don’t really know, but my general impression is that everything is moving more and more towards TypeScript, not away from it. But maybe I’m wrong?

Does anyone who actually works with TypeScript have any impression about this?

  • If TypeScript still is a fad at this point, his definition of fad is far lengthier than mine is.

    I’m fairly sure TypeScript will remain in popular use longer than whatever project you’re working on 😅

  • CoffeeScript was a fad, but TypeScript seems to gaining more and more popularity these days, with new runtimes like deno supporting them natively. TypeScript finally gave Microsoft relevancy again in webdev world, so I bet they’ll go a great length to make sure it stays that way. If Microsoft were still making their own browser engine, I bet they’ll make it natively supports TypeScript too.

    • CoffeeScript was a fad because it didn’t solve anyone’s problems. It was basically “look how cool code you can write”.

      TypeScript is gaining popularity because static typing solves real problems. It’s also a superset of JavaScript instead of being a completely new language from scratch, which makes it easier for JavaScript devs to learn.

  • A fad? No, definitely not. TypeScript brings features (and structure) that will /should probably make their way into JS.

    It’s sort of like asking, “does SASS replace CSS” or “is liquid the next HTML?” They’re just implementations of features FE developers want in the core spec of JS, CSS, and HTML.

    • that will /should probably make their way into JS.

      Not really, IMHO. The main advantage of TS is that it will help you catch errors without having to run a particular piece of code - i.e. you won’t have to move to the third page of some multi-page form to discover a particular bug. In other words, it helps you catch bugs before your code even reaches your browser, so it doesn’t bring you much to have them in the browser.

      (There is a proposal to allow running TS in the browser, which would be nice, but you’d still run a type checker separately to actually catch the bugs.)

      •  56!   ( @56_@lemmy.ml ) 
        link
        fedilink
        53 months ago

        I think the important part is that the syntax will become standardised, rather than being defined by microsoft/typescript, potentially allowing for alternative implementations. It could also make the build step optional in some cases, which is something people dislike about typescript currently.

        • I think the syntax explicitly won’t get standardised - but the places where syntax can be put will be (e.g. after a : following a variable, before the =). With, yes, the goal of eliminating the build step, but the type checker (which really is just a linter at this point) would still be able to define their own specific syntax. I don’t think it could work any other way either, anyway.

  • 5 years ago everything was moving to TypeScript. Now everything has moved. Developers are still catching up, but it will be one-way traffic from here.

    I’m guessing your manager thinks TypeScript is like CoffeeScript. It is not like CoffeeScript.

    Also, TypeScript is only the beginning. In the halls of the tech giants most devs view TypeScript as a sticking plaster until things can be moved to webassembly. It will be a long time until that makes any dent in JS, but it will also be one-way traffic when it does.

  •  TehPers   ( @TehPers@beehaw.org ) 
    link
    fedilink
    English
    173 months ago

    Imagine changing your file extension from .js to .ts and calling it a fad. JS is TS. The difference is that TS does more (by actually doing stuff before runtime as a static analyzer, similar to eslint). If TS is a fad, then modern web dev is a fad.

    Which, to be fair, it is.

  • When anyone in a professional setting says they don’t like having a mega corp supporting something I lose a bit of respect for their opinion tbh.

    Yes we all know mega corps suck.

    But if you’re using anything in a professional production environment that is meant to last in the long term this is 100% what you want.

  •  nick   ( @nick@campfyre.nickwebster.dev ) 
    link
    fedilink
    English
    16
    edit-2
    3 months ago

    Hi, I’ve been doing TypeScript in my day-job and hobbies for six and a bit years now. I would not write JS in any other way.

    TS is also a superset of JS so all JS is valid (unless you turn on strict mode). So there is no productivity loss/learning curve unless you want there to be.

    In fact, a lot of people who think they’re not using typescript are using it because their editors use typescript definitions for autocomplete and JSDoc type signatures are powered by typescript.

  • Javascript is a fad, we should all move to WASM. 🙃

    But no, TypeScript is not a fad. Unless a better “Typescript like” thing comes out - I know how in frontend land people like to make their own substitute framework that does something slightly different than an existing framework - But I don’t really see why anyone would want to make a NewTypeScript, and not just expand existing TypeScript

  • The developer of Svelte moved from Typescript to JSDoc and explained in depth in an interview (you can find it on youtube). ECMA (the dudes making Javascript/ECMAscript) also started noticing that maybe static typing would be useful and there’s a proposal to add typing to it. Whether that’s moving forward or not, no idea, but if it were to come to vanillaJS, it’s imaginable that typescript would be much less useful than it is now.

    CC BY-NC-SA 4.0

  • To be honest Typescript and Javascript for me are both very bad Hacks driven languages. I explain myself: I’ve worked on a project for a client, with other devs who were experienced js/ts devs. Before to get on, I’ve read a book about them, went through the docs. But in the end, I would push PRs, and there was some hacky way to do stuff, now some stuff is just bad developers, choosing the hacky “obscure” undocumented way to do something, but other solutions were clear enough that deserved to be documented. Overall I am better off without using those