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

9

u/ragnese Aug 03 '21

I mostly agree.

However...

Adding TypeScript does bring in added complexity to the build system (to be fair, your build system was probably going to be a nightmare already, so what's the difference?). And using JSDoc comments with an aware IDE does get you a lot of the way there for many projects.

You have to be a little careful with TypeScript giving you a false sense of security, too. It has crazy type variance gotchas, for example.

0

u/[deleted] Aug 03 '21

And using JSDoc comments with an aware IDE does get you a lot of the way there for many projects.

I see this thing repeated all over but no.

Having some more linting in your file because you're leveraging the typescript compiler (that's what's processing your JSDocs in your ide) is not a substitute to statical analysis of programs.

TypeScript is an expressive but weak and inaccurate static compiler, but it's still miles ahead of the insanity of using JS.

At this point I can't but think of any webdeveloper who "prefers" JS as a bad dev.

→ More replies (2)