in reply to Recursion

It seems like the post asks about the following:

Some languages were designed (in the 70s) with recursion methodology in mind. Like Lisp. These had special constructs to convert the recursion into highly optimized OPs. Some special hardware was built for this as well. (remember 'tail recursion'?)

With this respect, and to my best knowledge, Perl does not supply any of these special constructs/optimizations. So just do whatever works for you, or whatever is more natural for the problem.

Replies are listed 'Best First'.
RE (tilly) 2: Recursion
by tilly (Archbishop) on Nov 15, 2000 at 06:11 UTC
    Actually Lisp was invented in the 50's.

    In fact Lisp was the first interpreted language built. Literally they were developing it, and had a manual process for turning Lisp into assembly. Someone wrote 'eval' in Lisp. Someone else noticed that it would be really neat if you translated that into assembly, and away it went!

    Programmers associate this stuff with the 70's because that was when the first mainstream programming langauges that supported recursion (like C) became popular.

RE: Re: Recursion
by dmitri (Priest) on Nov 15, 2000 at 13:45 UTC
    I would not call it 'recursion methodology.' LISP is usually referred to as functional language, hence the ease with which recursion is implemented. In LISP, recursion is intuitive and more often than not the right solution.

    LISP is fun. :)