Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

> Python programmer for 15 years [...] [Python] has no typing

Ok, I have to call this statement out. Mypy was released 15 years ago, so Python has had optional static typing for as long as you've been programming in it, and you don't know about it?

I guess it's going to take another fifteen years for this 2008 trope to die.



I'm primarily a Python programmer, I love mypy and the general typing experience in Python (I think it's better than TypeScript - fight me), but are you seriously comparing it to something - anything - with proper types like Rust?


> 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)


> but are you seriously comparing it to something - anything - with proper types like Rust?

Re-reading my comment, no, I did not. I said it has static typing.


> I have to call this statement out.

Why? That was just mean for no reason!


Is that mean? Sorry, English is not my native language. I just meant that I have to express my doubt of the veracity of the statement.


Your language is fine (I’ve enjoyed your blog posts too, never gave it a thought that English wasn’t your first language), I just thought it was unnecessarily hurtful to say they must be a phony because they didn’t know something.

But, everybody else seems to agree so maybe I’ve been had.


I didn't mean to say they are a phony, just that that statement is inaccurate/poorly thought out.


English is my native language. "I have to call out" is a perfectly fine (and polite) way to express doubt of veracity.




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

Search: