laziness, impatience, and hubris | |
PerlMonks |
Hacking with objectsby frankus (Priest) |
on Mar 23, 2001 at 15:30 UTC ( [id://66603]=note: print w/replies, xml ) | Need Help?? |
You have to understand both to know when to use OO, and how much is appropriate. This is my problem. If I were coding in Java or C++ I'd play it by the numbers, because the voices in my head don't tell me to make this code as terse (basically, at least for Java a well trained Labrador can understand the code, so where's the fun?). But for me, in my less sober moments, Perl is for being a wizard and bending the rules if not breaking them or taking 3 words from one rule and sticking them with half a dozen from another. So the desire to use Good OO principals is not always at the forefront of my mind. What I was commenting on was the desire to hack using OO. In the same way that on a certain day you might bung all the processing for a piece of code in a regular expression and know it is `baaad'; I'll say rather than have a for loop and an item before the for loop and an item after the for loop I'll make an object do the first thing in the constructor the for stuff in a method and the bit after the for loop in the destructor function, and believe me in this situation it is brevitous, feasable and reusable. When I'm feeling mischevous or bored or lazy why should I feel bad about misusing the tools of OO? Being in awe of OO stops the use of some cool features, why should I have to be an OO Designer? I like the food analogy, I like food :-). --Brother Frankus.
In Section
Meditations
|
|