The ternary operator has a low precedence.
Once you have fallen into its trap 2-3 times, you begin start programming more defensivly.
With the ternary operator I learned a general rule of programming "Don't try to be smart".
Something I did wrong quite a lot times: