Re:Examples of Incorrect Abstractions in Other Languages
by anentropic on Wednesday May 20, 2020 @05:44AM
(#23244981)
Actually, I believe this is expressible in Python's type system:
In Python 3.4-3.7 you'd need to install typing-extensions library:
[ Parent
| on HN ]
Re:Examples of Incorrect Abstractions in Other Languages
by still_grokking on Wednesday May 20, 2020 @09:28AM
(#23246551)
Interesting. It seems that "every second language" gets "type-classes" these days…
C++ added such feature, this above looks like a Python version, Rust has it, Scala had them as one of the first "OOP" languages.
It's nice to see that Haskell pioneered a very useful and now spreading language feature!