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?

  • DumbAceDragon@sh.itjust.works
    link
    fedilink
    English
    arrow-up
    0
    ·
    7 months ago

    Let me reverse this question and ask what is the benefit of dynamic typing? What is gained from vaguely defined objects?

    The purpose of typed languages is to ensure the bare minimum when it comes to safety. That when you’re accessing a field of an object that field is real, and that field is always going to be an int or a string.

    Try/catch only goes so far before it becomes way more cumbersome than necessary, as is checking every field of an object.

    Typescript is an example of a language that does static typing poorly, because by design it has to. It’s a quick bandaid fix over an inherently awful language.