Perl Monk, Perl Meditation | |
PerlMonks |
comment on |
( [id://3333]=superdoc: print w/replies, xml ) | Need Help?? |
A couple and half of monks (I'm the half ;) think that the ?: operator-pair is always less readable than an if/else block. As indicated, I half-agree, but I wonder if this is more a case of "I don't use or am not familiar with ?:, and therefore it's obfuscated" or "I understand the syntax of ?: perfectly, but I still think it makes code hard to read and/or maintain". The maintainability issue is a tricky one, but, given that ?: is not an operator-pair limited to perl, is it unreasonable to expect any code-maintainer to understand it? (or at least make the effort to find out about it?) What's the consensus on this one? Tom Melly, pm@tomandlu.co.uk In reply to ?: = Obfuscation? by Melly
|
|