Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

> Maybe algebraic data types would be more suitable.

There is no opposition between ADT and generics. In fact most language that have ADT have generics…

> In Go, you don't have subclassing, so you cannot implement YourClass<T extends SomeAncestor>.

There is no link between generics and inheritence, functionnal languages usually don't have OOP mechanism but they still have generics.



Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: