On the other hand, nested ternaries are pretty awful even when they work as expected.
double piecewise(double x)
{
return x < 0 ? x*x :
x < 1 ? x :
x < 5 ? x*x-x+1 :
21.
} $result = $someCondition
? $foo->abc()
: $foo->def();
To me that's much nicer than an if statement.And for what's not a monstrosity to begin with... It's not a monstrosity to begin with, you ain't gaining much