2 ms·
Eh what? No. I couldn't care less about structural types. I care about simple, consistent rules. "X is a type, you can use it wherever you want" is one. "X is
by frowaway001 12y ago
Eh what? No. I couldn't care less about structural types.
I care about simple, consistent rules. "X is a type, you can use it wherever you want" is one.
"X is a type, but there is also Y, which you can't really express in position A and B unlike X, but can only use it if you carefully avoid doing things #1 to #4" isn't one.
- dmacvicar 12y agoI agree with partly with you. I don't think it helps for consistency when you have to ask yourself why some functionality is defined in terms of a trait if it could be defined in terms of the structural type and just providing the methods would be sufficient.