[Q] big function vs many small functions
- From: tekenen@xxxxxxxxxxx (t.j.)
- Date: Tue, 25 Sep 2007 12:30:06 GMT
Let's say that one has a function with a large switch statement with
many case statements.
One way of writing the function is to just place all of the code for
each case inside of the function containing the switch statement.
Another would be to have an individual function for each case statement.
Which way is better in terms of maintainability and frequency of bugs?
I recall reading something where someone actually studied this situation
and determined there was no meaningful difference between the two.
Anyone else come across the same thing?
.
- Follow-Ups:
- Re: big function vs many small functions
- From: Christopher Corbell
- Re: [Q] big function vs many small functions
- From: Steve O'Hara-Smith
- Re: big function vs many small functions
- From: gremnebulin
- Re: big function vs many small functions
- Prev by Date: [ANN] Software Factories article in Methods & Tools Fall 2007 issue
- Next by Date: Re: big function vs many small functions
- Previous by thread: [ANN] Software Factories article in Methods & Tools Fall 2007 issue
- Next by thread: Re: big function vs many small functions
- Index(es):
Relevant Pages
|