[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: why tail recursion matters and why Java isn't it, was Re: lisp performance was Re: problems with lisp
On Thursday, September 4, 2003, at 03:10 PM, Pascal Costanza wrote:
>
> For? (sorry, I don't understand what you mean here...)
You said I made up an example. I don't have an example in my message.
>
>> 2. "Going pure" means to conduct a Gedankenexperiment. I don't
>> propose to
>> program in this pure style. But I do propose to construct programs
>> from first
>> ("natural") principles. Then you step back and see what you have
>> learned.
>> I have done both, have you? -- Matthias
>
> Yes
Then explain how to go from an arbitrary class hierarchy to a method
for computing
something in a general manner. (There is no way around recursion for
methods.)
If you have TCO, you're done. Period. Over with, though I may agree
that you may
wish to use loops such as map, reduce, filter, apply, and so on to
shorten the code.
If you don't have TCP, you have to do a major rewrite.
-- Matthias