4 ms·
> 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
by stymaar 10y ago
> 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.