3 ms·
I'm not sure I'm following. Rust allows: println!("{}", if x == None { "foo" } else { "bar" }); How would unions make this more ergonomic? For example, in
by throwaway894345 5y ago
I'm not sure I'm following. Rust allows:
println!("{}", if x == None { "foo" } else { "bar" });
How would unions make this more ergonomic? For example, in Python (with type annotations), you would have to do:
print("foo" if x == None else "bar")