in reply to Recursion

Which is better, a car or a truck? You're comparing apples and, uh, IBMs here.

-- Randal L. Schwartz, Perl hacker

Replies are listed 'Best First'.
RE: Re: Recursion
by lolindrath (Scribe) on Nov 15, 2000 at 00:36 UTC
    I disagree, most looping problems can be made into a recursive function and vise versa.

    --=Lolindrath=--
      Don't think of it in terms of the suitability for the language. Perl can do either just as well as any other language. Think of it in terms of the problem you're trying to solve. Does it make more sense to use a recursive algorithm or an iterative one? Perl is fine either way, like most languages.
      Yes, and most cars can be used as trucks, and most trucks can be used as cars. Questions with "better" are rarely answerable until we understand what the context is, and what you're optimizing for.

      -- Randal L. Schwartz, Perl hacker