Hacker News new | past | comments | ask | show | jobs | submit login

> I think it's better than TypeScript - fight me

I used Python type hints and MyPy since long before I used TypeScript, and I have to say that TypeScript's take on types is just plain better (that doesn't mean it's good though).

1. More TypeScript packages are properly typed thanks to DefinitelyTyped. Some Python packages such as Numpy could not be properly typed last I checked, I think it might change with 3.11 though. Packages such as OpenCV didn't have any types last I checked.

2. TypeScript's type system is more complete, with better support for generics, this might change with 3.11/3.12 though.

3. TypeScript has more powerful type system than most languages, as it is Turing-complete and similar in functionality to a purely functional language (this could also be a con)




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: