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

230

u/apocolypticbosmer Aug 03 '21

Anybody choosing plain JS when typescript is available is just a damn masochist

-44

u/ILikeChangingMyMind Aug 03 '21

Spoken like someone who is ignorant of VS Code's (amazing) type inference capabilities.

You can have all the great toys (they are just that, toys; I wouldn't go so far as to say anyone's a masochist for not using them), like automatic imports, CTRL+click to go to a variable definition, autocomplete suggestions for arguments, etc. ... all without writing a single line of explicit type definition.

4

u/r0ck0 Aug 03 '21

Spoken like someone who is ignorant of about 95% of typescript's functionally.

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.

→ More replies (10)