In my head I had conflated duck and weak typing. I’m not an oop programmer (tbh I’m not much of a programmer to begin with) and since what Python does e.g. with file handles is closer to say in Haskell making a wrapper
DataStream x -> FileHandle x
Where like implementing the read/write/open etc methods are equivalent to implementing the function mappings.
Which is very different from say JS “Herr durr I’m going to cast an int to a string and then error” I assumed the latter was “duck typing”
In my head I had conflated duck and weak typing. I’m not an oop programmer (tbh I’m not much of a programmer to begin with) and since what Python does e.g. with file handles is closer to say in Haskell making a wrapper
DataStream x -> FileHandle x
Where like implementing the read/write/open etc methods are equivalent to implementing the function mappings.
Which is very different from say JS “Herr durr I’m going to cast an int to a string and then error” I assumed the latter was “duck typing”