Beefy Boxes and Bandwidth Generously Provided by pair Networks vroom
Perl: the Markov chain saw
 
PerlMonks  

Re: Short routines matter more in OO?

by DentArthurDent (Monk)
on Oct 13, 2003 at 15:03 UTC ( #298852=note: print w/ replies, xml ) Need Help??


in reply to Short routines matter more in OO?

I don't think it matters whether or not you're using OO. I think each function needs to do one particular task. If a subset of that task is needed by another task, then that subset needs to be factored out into a seperate function so that that code is unified for all consumers of that code.

Let's generalize the long loop code issue and say that any block (for languages that have them) that extends beyond some arbitrary length limit particularly if it has many nested blocks should have it's guts factored out.

----
If I melt dry ice can I swim without getting wet?


Comment on Re: Short routines matter more in OO?

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://298852]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others meditating upon the Monastery: (7)
As of 2014-04-20 11:48 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    April first is:







    Results (485 votes), past polls