[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 02:08 PM, Pascal Costanza wrote:

> Matthias Felleisen wrote:
>> On Wednesday, September 3, 2003, at 01:11 AM, Peter Seibel wrote:
>>> What's unnatural about looping? If I find certain algorithms easier 
>>> to
>>> think of in terms of a loop (do this, do that, then go back to the
>>> beginning unless I'm done) what does that mean? That I'm a 
>>> programming
>>> illiterate? That I'm *really* thinking in terms of recursion but 
>>> don't
>>> know it because I've somehow trained my brain to unnaturally 
>>> translate
>>> my Platonic recursive ideas into an "iterative" form before they 
>>> reach
>>> my consciousness?
>> To understand how program design truly works, you need to go "pure".
>
> "Purity" is an aesthetic category. In your example, you have purity as 
> a premise (a minimal set of language features) and purity as result (a 
> program that behaves in a "pure" way). If you think that purity is 
> beautiful, it's no wonder that you like both the premise and the 
> result.
>
> However, there are other possible aesthetic categories.

1. I don't have an example.
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