Re: Recursive functions
- From: Lauri Alanko <la@xxxxxx>
- Date: 1 Apr 2007 20:10:25 GMT
In article <1175456107.493063.221730@xxxxxxxxxxxxxxxxxxxxxxxxxxxx>,
Bill Pursell <bill.pursell@xxxxxxxxx> wrote:
Because it is totally inappropriate to use a recursive
function to compute the length of a string.
"Totally inappropriate" apparently means here "inefficient on a
typical C implementation". That is certainly true, but not always
crucial. Even the space performance isn't an issue if the lengths of
all argument strings are known to have a reasonable bound.
Efficiency aside, recursion is certainly a natural way of defining the
length of a sequence.
Lauri
.
- Follow-Ups:
- Re: Recursive functions
- From: Bill Pursell
- Re: Recursive functions
- References:
- Recursive functions
- From: Harry
- Re: Recursive functions
- From: Bill Pursell
- Re: Recursive functions
- From: Harald van Dijk
- Re: Recursive functions
- From: Bill Pursell
- Recursive functions
- Prev by Date: Re: Equivalent malloc with calloc
- Next by Date: Re: when can realloc fail?
- Previous by thread: Re: Recursive functions
- Next by thread: Re: Recursive functions
- Index(es):
Relevant Pages
|