in reply to Program structure: subs vs modules vs Selfloader
Looks to me like there isn't much reason to have the subs larger or small in the first place.
IMO there are generally two reasons to have a subroutine.
Adding subroutines where there's no clear reason for one just adds confusion to a script.
That being said, if you do break things up into subroutines, it's generally good form to ensure that each subroutine does one thing and one thing only. Short and too the point.
A run-on subroutine suffers from the same disease as a run-on sentence.
I recommend reading Code Complete by Steve McConnell (M$ press). It a very good book on coding style and best practices.
Cheers
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Program structure: appeasing the Gods
by awwaiid (Friar) on Jun 23, 2004 at 01:49 UTC |