DEV Community

Discussion on: Tag Your Unions Before You Wreck Your Unions

Collapse
 
buntine profile image
Andrew Buntine

Nice article. The Rust language also has great support for tagged unions with it's Enum construct. It also forces (at compile time) that all possibilities are catered for.

Enforcing safety as a formality in a language is a fantastic feature. It prevents the laziness that we often resort to when dealing with less strict languages.