Your skill will accomplish what the force of many cannot |
|
PerlMonks |
Re^4: checking values of variablesby AnomalousMonk (Archbishop) |
on Aug 12, 2013 at 19:33 UTC ( [id://1049172]=note: print w/replies, xml ) | Need Help?? |
I tend to believe that code golf and maintainablity are often at odds. As do I. In fact, I would go a bit further and say that code golf and maintainablity are almost always at odds. Clarity is immensely important for maintainable code and concision or terseness is a very important element of clarity, along with many others. (Of course, terseness is the only consideration in 'golfed' code!) So List::MoreUtils could be used to express the code this way:
The problem I see with either a solution like In fact, if it was the case or if there was any likelihood that the group of variables involved in the OPed code or the condition against which they were being tested would occur again elsewhere in the code, I would, in the interests of maintainability, be strongly tempted to go for whole-hog generalization (even though some might criticize it as premature) with something like this:
In Section
Seekers of Perl Wisdom
|
|