|
|
|
|
|
by imetatroll
2640 days ago
|
|
You can define methods on structs which is not unlike classes. You can define an interface with methods that allow objects to be processed in a more generic fashion. I think that more than anything it would require a change of mindset that people understandably don't want to deal with. |
|
As well as other options. [3]
I like to imagine that the "no generics, no way" crowd would never use the stairway in their building if the elevator broke down.
[0] https://github.com/clipperhouse/gen [1] https://github.com/cheekybits/genny [2] https://github.com/cosmos72/gomacro [3] https://appliedgo.net/generics/