3 ms·
I agree with this. It appears that in this case, macros are a band-aid over missing features in the type system. I feel like structural typing or anonymous sum
by kaashif 1y ago
I agree with this. It appears that in this case, macros are a band-aid over missing features in the type system.
I feel like structural typing or anonymous sum types would solve this problem without macros.
I mean given A = X | Y and B = X | Y | Z, surely the compiler can tell that every A is a B?
- estebank 1y agoThis has problems as soon as it hits generics and lifetimes. That being said, I think a limited version of the feature that disallows the the same type with divergent lifetimes or even all generics would still be useful and well liked.