Sitemap

Member-only story

Why do we have Typed JavaScript while there isn’t a Typed Python?

Shuai Li
2 min readMar 15, 2025
Photo by Hitesh Choudhary on Unsplash

TypeScript, a strongly typed programming language that builds on JavaScript, has been popular for years.

Meanwhile, there isn’t a typed Python. I know there is a type hint system in Python, but anyway, it’s just a hint, not a type system.

So, why do we have typed JavaScript while there isn’t a typed Python?

Here are my thoughts.

1# JavaScript is the mono-language in web development

If anyone wants to develop a web app, he has to write JavaScript code. It’s the only choice.

For those who prefer static languages, they are forced to write JavaScript code. Where there is oppression, there is resistance. Although JavaScript’s dominant position in the web domain is unshakable, they can intervene from the development phase.

Thus, TypeScript was created — developers write TypeScript first, then compile it into JavaScript. This way, they can enjoy the benefits of a type system while still ensuring their code runs in the client’s browser.

Python code mainly runs on the developer’s own machine. If a developer prefers static language, he is free to use C++, Java, or other typed languages. He doesn’t need to choose Python at the…

--

--

Shuai Li
Shuai Li

Written by Shuai Li

An enthusiastic game player of Earth Online.

Responses (6)