4 ms·
Unless and ternaries are great signals in a pull request that you should build a truth table and double check it. They're backwards all the time, especially in
by klooney 4y ago
Unless and ternaries are great signals in a pull request that you should build a truth table and double check it. They're backwards all the time, especially in less tested, error handling codepaths.
- asdajksah2123 4y agoternaries are expressions. Just because of that they are far superior to if/else/unless, unless ;-) you're using the ternaries to execute statements with side effects instead of just returning a value.
- giraffe_lady 4y agoThose are also expressions in ruby.