Stack Overflow Explores Why Developers Love TypeScript More Than Python

Stack Overflow asked 65,000 programmers for their favorite programming language, and this year Microsoft’s TypeScript knocked Python from the 2 spot. So they interviewed Microsoft’s principal engineering lead for the language “to find out what about TypeScript makes it so dang lovable.”

Q: Do you remember why the team came up with TypeScript, why you wanted to release something like this?

A: When I joined the team, there were a lot of people at Microsoft who wanted to develop JavaScript at what we call “application scale.” Teams like TFS and Office wanted to build large JavaScript applications. A lot of those people had familiarity with statically-typed languages — C++, C#, Java, that kind of thing. They wanted to have that static typing available both for conceptual scalability and for the tooling…

Q: Was there a point where you saw an adoption point of no return? Was there something that came along where people were like, oh, yeah, we do TypeScript now?

A: Oh, it was definitely Google announcing that they were going to use TypeScript with Angular. That’s kind of lost to time now. But if you look at the graphs for TypeScript, literally any graph — GitHub stars, downloads, pull requests — you can see the exact point when that Angular announcement came out. And the graph just changes. It never looks back… TypeScript shores up that last rough edge on JavaScript and gives you something that’s just really fun to work with and runs everywhere. I think if TypeScript were a language that was built on top of a less universal language or a less fun language, I don’t think it would be as successful. It’s really taking something that’s great and making it better…

I think my favorite thing that I see is people on the Internet saying, ‘I did this huge refactoring in TypeScript and I was refactoring for three hours. And then I ran my code and it worked the first time.’ In a dynamic language, that would just never, ever happen…

I would just say to people, if static types aren’t a good fit for you, for either your programming style or the problem you’re working on, just skip it. That’s fine. It’s okay. I won’t be offended. If someone can get a thirty thousand line application that gets its job done without static types, I’m very impressed. That just seems really difficult. But kudos to those people who make it work. Python’s the same way. Very few people have working Python type annotations, but Python is incredibly popular. I think the data speaks for itself — I think Python is number three in the survey… I guarantee you that a very small proportion of those Python developers have static types. Whatever your problem domain is, that might be the best fit for you.

4 Likes

Awesome !

Typescript makes my life easier. Happy to see it topping the list on Stack Overflow.

2 Likes