3 ms·
a?[b] happens to be valid Rust already. Rust doesn't have the ternary `?:` operator, because almost everything is an expression, so you can use regular if/else
by pornel 7y ago
a?[b]
happens to be valid Rust already. Rust doesn't have the ternary `?:` operator, because almost everything is an expression, so you can use regular if/else anywhere.
That ship has sailed for Dart, but the other syntax doesn't look too bad either.