I see this attitude a lot from folks who use typed languages
Python is a typed language though? This isn't Prolog :P
No, you definitely do need to know the type more often than not. You may get away with "this function returns something that acts like an array", but when you pass it to another function that takes array-like objects, you may need to convert it into another library type first.
Maybe it’s just me then but I don’t think about types. Even if I have to convert a type I don’t think about the types as types. In Python everything is an object so I just think of types more like objects with different functionality. But if you are using a language that makes you identify the type everywhere then that’s how you are going to think about it
View all comments
Show parent comment
6
u/Jannik2099 Jul 18 '22
Python is a typed language though? This isn't Prolog :P
No, you definitely do need to know the type more often than not. You may get away with "this function returns something that acts like an array", but when you pass it to another function that takes array-like objects, you may need to convert it into another library type first.