3 ms·
In other languages, you can easily define constraints on generic types. It’s not rocket science, but actively ignoring any advancement since the 70s means that
by thomasz 7y ago
In other languages, you can easily define constraints on generic types. It’s not rocket science, but actively ignoring any advancement since the 70s means that you have to reinvent the wheel constantly.
- baby 7y agoGolang could do this by implementing unions on interfaces.
- convolvatron 7y agoI certainly agree with your later example (cars+planes)...but how do union types help with subtyping?
- baby 7y agohow do generics help with subtyping?