3 ms·
> a slice of structs that implement an interface should be able to be used as a slice of that interface It absolutely should not even if it could (which it can
by masklinn 5y ago
> a slice of structs that implement an interface should be able to be used as a slice of that interface
It absolutely should not even if it could (which it can not since the memory layouts don’t match), as that undermines the type system.
- whateveracct 5y agoIf it were immutable at least, the type system wouldn't be undermined at all.
- masklinn 5y ago> If it were immutable at least Yeah but immutability’s not even remotely a thing in go land.