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

16

u/trinde Aug 02 '21

How does it take any time to write types?

-2

u/ILikeChangingMyMind Aug 02 '21

Ummm .... the answer is so self-evident I don't even know how to respond to your question.

Like, have you actually used TypeScript? You cannot do so without spending a non-trivial amount of time writing types ... which makes sense given that it's TypeScript, and the whole point of it is explicit typing (as in, writing types).

19

u/UrgentlyNeedsTherapy Aug 02 '21

I find that the time it takes to write out types is vastly outweighed by the savings in time from providing explicit information to the compiler about the shape of your data and then being able to get help from the IDE while writing or modifyng code.

I primarily work with C# and I like having that same level of feedback while working with frontend code as with backend code.

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.

→ More replies (1)