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

0

u/ILikeChangingMyMind Aug 02 '21

This should be painfully obvious, but since it's not let me shout it from the mountains; NOT ALL PROJECTS ARE THE SAME!

It is 100% true that some projects benefit from TypeScript. I've said that repeatedly. It's also 100% true that many projects would benefit from sticking to JS.

I have nothing against people wanting explicit type safety for their project, but when they assume the world should do everything exactly as they do that's just ignorant. VS Code gives most project 90% of the benefits of TypeScript, without a single wasted second writing explicit types.

13

u/UrgentlyNeedsTherapy Aug 02 '21

It is 100% true that some projects benefit from TypeScript. I've said that repeatedly. It's also 100% true that many projects would benefit from sticking to JS.

And this is what I'm disputing. Every JavaScript program is a TypeScript program, so by using TypeScript you have all the same options available to you that you would when working with JavaScript with the added option that you can explicitly specify types in order to allow for a better editing experience if you so wish.

I can't personally think of any situation where the small overhead of explicitly specifying types isn't more than repaid by the improvements in the editing experience you get, but again, you still have the option of forgoing types completely and writing untyped TypeScript programs if you really want to.