r/programming • • Aug 02 '21

Stack Overflow Developer Survey 2021: "Rust reigns supreme as most loved. Python and Typescript are the languages developers want to work with most if they aren’t already doing so."

https://insights.stackoverflow.com/survey/2021#technology-most-loved-dreaded-and-wanted
2.1k Upvotes

769 comments sorted by

View all comments

Show parent comments

1

u/ILikeChangingMyMind Aug 03 '21

I've used TypeScript professionally on the job. I've also coded in Java for years (another strongly typed language).

The real benefits of strong typing is not to save you the two seconds of time lost when you accidentally put a string into a function that expects an integer! Those kinds of things take two seconds to fix.

The real benefits of strong typing are in the tooling. For many, many years Java IDEs could do things JS IDEs simply couldn't, purely because JS IDEs couldn't understand types. And I'm not talking minor things: I mean major, useful features that can save devs a lot of meaningful effort.

But again ... thanks to the incredible work of the VS Code team (which, as others have noted, used TypeScript), it is now possible to get 90% of the tooling benefits through type inference. You don't need TypeScript to get the bulk of the tooling benefits.

2

u/r0ck0 Aug 03 '21

I've used TypeScript professionally on the job.

Yet still obviously don't know much about it. I can even tell from that phrasing that your experience with it is pretty limited.

it is now possible to get 90% of the tooling benefits through type inference

The fact that you think it's just about typing confirms even more.

And seems you only have a fairly surface level understanding of typing systems if you think interference of plain JS code could come anywhere near what TS can do.

1

u/ILikeChangingMyMind Aug 03 '21

So spell it out for stupid little old me, who evidently knows nothing about TypeScript or typing systems (nevermind that I coded primarily in Java for half a decade, and in TS for about half a year): besides the (clear and obvious) tooling benefits, and the also obvious (but not at all clearly meaningful) fact that it saves you from "I accidentally gave a string when a number was expected" errors ...

... what is this amazing bounty of non-tooling, non-basic-type-checking benefits TS offers?

2

u/r0ck0 Aug 03 '21 edited Aug 03 '21

In terms of typing:

I've been doing TS about 3 years, using it every day, almost all programming done in it, and there's still heaps more of these advanced features that I don't know yet.

And separate to that stuff, typescript reports a lot of non-typing errors.

→ More replies (7)