in reply to Is there an ideal module size or subroutine size?
My ideal size of a subroutine is "one thought". More specifically, a subroutine ought to be short--easy to understand when separated from the rest of your application. If it gets too large, then usually it's because you have other thoughts in there that should be split out as their own subroutines. Sometimes, however, it's long because the thought isn't naturally decomposable into multiple smaller thoughts. I can't think of an example off-hand, because I find these to be rarities.
...roboticus
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Is there an ideal module size or subroutine size?
by GrandFather (Saint) on Aug 14, 2007 at 21:01 UTC | |
by tye (Sage) on Aug 14, 2007 at 22:47 UTC | |
by roboticus (Chancellor) on Aug 14, 2007 at 21:35 UTC |