by brentsch · 5y ago · 0 comments
Out of curiosity, are there languages for which the enum implementation supports and encourages encoding complex data like this?
https://doc.rust-lang.org/rust-by-example/custom_types/enum....
[0] https://www.reddit.com/r/rust/comments/l594zl/everywhere_i_g...
If you don't have destructuring, they're less attractive. There's a proposal to add destructuring to python[1] so we'll see
Look how they encode planetary data into the enum of the Solar system planets.