4 ms·
You can achieve something similar via a library: https://github.com/mcintyre321/OneOf https://github.com/mcintyre321/OneOf I also think language level support
by macca321 10y ago
You can achieve something similar via a library: https://github.com/mcintyre321/OneOf https://github.com/mcintyre321/OneOf
I also think language level support for this would be a killer feature, it turns OOP and the requirement to use polymorphism to guarantee strategy-per-type on it's head.