Re:Why your first Rust FizzBuzz implementation may not work
by Too on Monday October 13, 2014 @12:36AM
(#8447500)
I've seen it quite frequently and kindof like it because it doesn't introduce any state that could leak out or get mutated from somewhere else. Although the ternary operator doesn't make as much sense in python as in other languages since there is no const keyword, otherwise that's what the ternary operator is usually used for.
[ Parent
| on HN ]
Re:Why your first Rust FizzBuzz implementation may not work
by adamnemecek on Monday October 13, 2014 @12:50AM
(#8447530)
I've only ever seen it non-nested.
Re:Why your first Rust FizzBuzz implementation may not work
by chrismorgan on Monday October 13, 2014 @12:53AM
(#8447535)
I’ve certainly written `a if b else c if d else e` before, and it reads perfectly naturally—but you do want to be careful doing such things. They’re very easy to overuse.