|
|
|
|
|
by nine_k
1820 days ago
|
|
Haskell and, IIRC, Rust allow you to declare that a certain data type conforms to some interface, and describe how, by listing / adding the functions with necessary signatures. This allows to have the upsides of structural polymorphism without losing static checks. Go, OTOH, goes all the way structural. |
|
I believe at least in the case of Haskell, you are referring to type classes[0].
0 - https://wiki.haskell.org/OOP_vs_type_classes