by nextaccountic · 1y ago · 0 comments
Things like
enum Something {
One(String),
Two(i32),
}
Also, how is your usage of Option? (one such enum)I think this plus pattern matching is the foundation of Rust's superpowers. It's also very old tech and absolutely not Rust's invention, present in languages like OCaml and SML. Hence the early Rust slogan, "technology from the past, come to save the future from itself"
And of course, Options and pattern matching are easily the best part of the language and very powerful. I am obsessed with things like "let x = if {...}".