|
|
| Don't ask to ask, just ask | |
| PerlMonks |
Re: Re: Re: perl OO - to use or not to useby leriksen (Curate) |
| on Sep 16, 2003 at 00:53 UTC ( #291691=note: print w/ replies, xml ) | Need Help?? |
|
To some extent I agree with you - very few non-trivial applications are easier/better in procedural vs OO (and I agree with you on the functional approach too - but just try writting a useful Haskell version of a nontrivial app - sheesh!!). It just depends on how wide your values for non-trivial are :-)
after that I start doing the decomposition dance oh, and btw, I make it a rule never to write the same code twice in an app - I always factor out to a sub or method. This help highlight new candidates for classes/modules faster. And if I notice that much of the code is avariation on a theme, I stop and try to find some abstraction that allows me to parametize that code. I think it was Donald Knuth who said Every problem in computer science can be solved with either more - or less - abstraction. Experience tells you which one of those to apply.
In Section
Seekers of Perl Wisdom
|
|
||||||||||||||||||||