3 ms·
You seem to be stuck in the topic of how useful structural typing is. Which I agree with.
by dmacvicar 12y ago
You seem to be stuck in the topic of how useful structural typing is. Which I agree with.
- frowaway001 12y agoEh 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.