4 ms·
object variants are more flexible than enum types so what you see as a limitation others don't.
by planetis 4y ago
object variants are more flexible than enum types so what you see as a limitation others don't.
- spion 4y agoNo, I want first class algebraic datatypes that don't make easy things hard i.e. https://forum.nim-lang.org/t/904 https://forum.nim-lang.org/t/904 vs `#[derive(Eq)]`
- planetis 4y agoLibraries exist: https://github.com/haxscramper/nimtraits https://github.com/haxscramper/nimtraits https://github.com/andreaferretti/patty https://github.com/andreaferretti/patty https://github.com/alaviss/union https://github.com/alaviss/union Again we are not new to this problem and already offer alternatives.