Comment

Comment by echelon

I'm going to flag this submission. This is horrible Stack Overflow post with bad answers.

Languages have different types of "enums". Enums in languages like Rust are extraordinarily powerful sum types that create compact memory footprints, strong compile time guarantees, and can form the basis of expressive and correct state machines.

Enums (sum types) are one of the best patterns.

parent echelon 5 years ago

Discussion

Live from the official Hacker News API

A modern reader for Hacker News · SvelteKit + Skeleton