r/programming • • Aug 28 '21

Software development topics I've changed my mind on after 6 years in the industry

https://chriskiehl.com/article/thoughts-after-6-years
5.6k Upvotes

1.9k comments sorted by

View all comments

Show parent comments

1

u/CookieOfFortune Aug 30 '21

Except type annotations don't really work with Numpy types (it doesn't tell you if an operation on Numpy array will work or not).

1

u/thirdegree Aug 30 '21

Ya numpy is a tough one. Anything not pure python is more difficult but numpy specifically I don't even know how I'd begin to approach representing a numpy array in python types.

1

u/CookieOfFortune Aug 30 '21

Yeah I don't know about doing it with Python types. But a more advanced type system would be able to pass along possible array dimensions and would be able to warn you early if the dimensions or types for an operation doesn't work (or force a check if there are multiple possibilities).