3 ms·
I am ambivalent over generics. I can today write: type meh interface{ foo() error } type whatever struct {} func (h *whatever) foo() error And still pass []
by rad_gruchalski 5y ago
I am ambivalent over generics. I can today write:
type meh interface{ foo() error }
type whatever struct {}
func (h *whatever) foo() error
And still pass []whatever{} to func canihaz([]meh) so not sure how much generics really add to that.
I don’t mind generics but when they are there, I use them. Whatever :)
Accepting interface{} is a code smell. I’d accept that only when dealing with wire data. Never in the business logic.