Beefy Boxes and Bandwidth Generously Provided by pair Networks
Think about Loose Coupling

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?

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

How do I use this? | Other CB clients
Other Users?
Others musing on the Monastery: (10)
As of 2015-11-25 11:26 GMT
Find Nodes?
    Voting Booth?

    What would be the most significant thing to happen if a rope (or wire) tied the Earth and the Moon together?

    Results (674 votes), past polls