in reply to Re: Precedence for Idiots
in thread Precedence for Idiots
Hmm... I half agree with you. A week ago, any code containing ?: would have confused the hell out of me, but purely because I'd never used it or made myself familiar with what it did (or, to be honest, even knew it existed).
However, I think one has to make a distinction between "this is obfuscated because I don't recognise the operator" and "this is obfuscated because I don't understand what the use of this familiar operator is going to produce under these conditions".
IMHO, once the basics of ?: are understood, then one could argue that one line of code to assign a value to a variable, rather than 6 is no more or less obfuscated, but may make the code more readable purely on the basis of being shorter... still, this might make an interesting discussion point in meditations, so I'll raise it there, and edit my tutorial accordingly according to the consensus...
Tom Melly, email@example.com