Should I convert FORTRAN code to C?

T. William Wells bill at proxftl.UUCP
Fri Jul 8 02:09:36 AEST 1988


In article <4700015 at m.cs.uiuc.edu>, kenny at m.cs.uiuc.edu writes:
>
> On the discussion of whether or not `recursion is necessary,' I have
> at least a nickel's worth of comment.  The example shown is frightful!

> [...very long description of recursion elimination]

It is the fact that most (but not all) recursion can be
eliminated by techniques similar to those he describes that I
advocate always giving an "it has to be recursive" routine a
thorough examination to see whether that is true or not.

However, I rarely write recursive routines, not because I
optimize the recursion out, but because my programming habits are
such that I almost always think first of iteration. When
iteration is possible, it is usually better than recursion.

Should that fail, then I write it recursively. Then I try to
optimize it out.

The only routines that this routinely fails for is data
structure traversal routines where backup is necessary.



More information about the Comp.lang.c mailing list