At the same time, there's still that Perlish allure of simplifying code which ought to look simple.
But simply looking code doesn't exclude repetition, or not using modules. A simple accessor, for instance the one found the OPs post, remains simple, even if repeated several times with just a change in the name of a variable. The human mind is geared towards recognizing patterns - it won't get confused, and a pattern is the opposite of line noise. OTOH, having a module generating the accessor for you will always leave some people with the question what really goes on in the accessor, and they'll have to look at, and understand, the code generating code in the module.
In reply to Re^4: RFC: The Poor Man's Accessor Filter
by JavaFan
in thread RFC: The Poor Man's Accessor Filter
by rje
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |