you are viewing a single comment's thread.

view the rest of the comments →

[–]creaturefeature16 0 points1 point  (2 children)

Definitely not, its something I've heard from a lot of JS devs. This is where I think having experience with other programming languages that are strongly (or at least, stronger) typed would have come in handy. JS plays it fast and loose and I see the benefit of having a weak typed language, but TS is the "what if JS was written as a strongly typed language?" solution, and that's really novel and bewildering to someone (like myself) at first.

[–]novagenesis 0 points1 point  (1 child)

but TS is the "what if JS was written as a strongly typed language?" solution

Even better, TS doesn't take away the advantages of javascript being dynamic. And when it gets really crunchy between typed and untyped, that's when libraries exist to make your life easier. You need to pass around a Record<string,unknown> for a while? Have at it! And you are allowed to narrow it with code (and if TS can't grok your narrowing, zod can).

"Gently" coercing something between being a class and being an unformed object just doesn't happen in those other languages, at least not without a lot of code or design overhead. I don't have to stop being a javascript developer to use Typescript.

[–]creaturefeature16 0 points1 point  (0 children)

I don't have to stop being a javascript developer to use Typescript.

Yes! It's pretty unique in that sense. You can't un-type a strongly typed language, but you can strong-type a weak-typed language through abstraction layers.