Re:Reflections on 10k Hours of Programming
by skohan on Friday August 06, 2021 @11:58AM
(#28088957)
Yeah I think there's a time and a place for ternaries, but when used correctly they're just so concise.
Like if you have super long expressions in your ternaries, or you have a bunch of nested/chained ternaries it can be hard to parse, but in a lot of cases it's so nice to get something onto one line instead of needing an if/else
Like if you have super long expressions in your ternaries, or you have a bunch of nested/chained ternaries it can be hard to parse, but in a lot of cases it's so nice to get something onto one line instead of needing an if/else