Perl Monk, Perl Meditation | |
PerlMonks |
Re: A Class:: module I don't want to writeby Aristotle (Chancellor) |
on Nov 24, 2005 at 00:33 UTC ( [id://511288]=note: print w/replies, xml ) | Need Help?? |
I agree with what shotgunefx said over in your other thread. I think these modules are symptoms of a fundamental problem in Perl5. The basic task is about as trivial as a task gets, and always depends quite intimately on the other code you’re writing. In other words, this is not something that can be reused. What it is is something which should be transparently rewritable every time you need it, by virtue of the language supporting enough abstraction that no particular rewrite of the code duplicates logic to an appreciable extent. Accessor generation should be composable so directly of such basic operators that rewriting it would “duplicate” no more “logic” than writing $total = $price + $vat in one place in the code and $eta = $now + $runtime in another does. With Perl5, rewriting is doable, but a tad too verbose – hence the desire to package the code into a module, even though it is conceptually un-reusable. Hopefully the higher-level functional composition operators in Perl6 will make this sufficiently transparent. Makeshifts last the longest.
In Section
Seekers of Perl Wisdom
|
|