Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Verbose.


The thing is, Rust's Option type means the primary use of the ternary in other languages - `foo ? foo : somedefault` - is entirely unnecessary in Rust. Other uses of it tend to benefit significantly from being more obvious about what's happening.

I think a ternary operator would be the first construct in Rust that prevents reading a statement from left to right.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: