View Single Post
Old Nov 6th, 2007, 11:26 PM   #5
ZenMasterJG
Hobbyist Programmer
 
ZenMasterJG's Avatar
 
Join Date: Nov 2004
Location: Boston, MA
Posts: 147
Rep Power: 4 ZenMasterJG is on a distinguished road
Send a message via AIM to ZenMasterJG
Re: 1 line if code blocks; easier to read

Lance: Its probably not a common pet peeve, but i *hate* those if statements, because they hide the condition. If you need to make a change to someone else's code and you're reading it quickly its entirely too easy to miss the condition altogether, which can really screw up your understanding of the code.

... Then again, I suppose readability has never been one of Perl's strong suits, but they've recently put a similar construct into Python, and I hate it too.
ZenMasterJG is offline   Reply With Quote