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
In reply to Re: Is there an ideal module size or subroutine size?
by roboticus
in thread Is there an ideal module size or subroutine size?
by talexb
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |