Re:Seven years of Go
by jerf on Thursday November 10, 2016 @12:05PM
(#12922102)
Python has always had Go-like interfaces in practice. The problem was that they were not reified into the code, so you had no easy way to know when calling a function and passing it a "file" exactly what file-like things the function was going to do with that "file" without reading the source code. You had to extract the interface yourself.
[ Parent
| on HN ]
Re:Seven years of Go
by fizzbatter on Thursday November 10, 2016 @02:10PM
(#12923247)
Not only that, but there's simply no guarantees. You can abuse a function in any way you see fit in Python, and the only one that suffers is your runtime sever :(
Optional types in 3.5 look awesome - but i don't want to lose duck typing. I want Go-interfaces in Python.