Comment

Comment by skavi

I don’t know about the others, but Rust absolutely has tagged unions. It’s just the enum type.

edit: just checked the others. D has https://dlang.org/phobos/std_sumtype.html and C++ has std::variant. both seem a bit clunky, but usable.

parent skavi 4 years ago

Discussion

Live from the official Hacker News API

A modern reader for Hacker News · SvelteKit + Skeleton