News for hackers. Stuff that matters.
Re:Etsy’s Journey to TypeScript by IshKebab on Wednesday November 17, 2021 @10:14AM (#29254108)
Typescript is far far superior to Python's type annotations. It's not close.

1. Probably 90% of the JS ecosystem has type definitions. Python is more like 40% so you're constantly hitting issues with dependencies lacking types.

2. Python only describe how to write down the annotations not what they mean. So you have several different type checkers that sometimes disagree on quite basic stuff like whether a variable can change type or not.

3. There are some holes in the annotation system, e.g. you can't properly annotate `kwargs`. It's a really bad idea to use kwargs but Python programmers don't usually write the highest quality code, and they often end up using kwargs a lot, so it would be nice to be able to type them.

Don't choose Python.

There are no comments on this comment yet.