[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: lispperformance was Re: problems with lisp
Shriram Krishnamurthi wrote:
> Pascal Costanza <firstname.lastname@example.org> asks in what I can only
> hope is a fit of passion overcoming rational thought:
>>Why should it be important to cover all cases?
> Because programming language designers should not think they are a
> whole lot smarter than the programmers who will use their language.
> (Note: This wording even accommodates the design of Arc.)
I totally agree. Are language designers who don't include loop
constructs in a language a "whole lot smarter" than the programmers who
will use their language?
> Pushing even further, I would not want to use a programming language
> that *prohibits* the creation of syntactic abstractions that better
> capture constructs for a particular domain, especially new binding
> constructs and control structures ("loops"). While the language no
> doubt already supports pretty useful constructs for many purposes, I
> would not want a barrier to creating a better lightweight embedded
> language. A good language provides macros or templates just so it can
> "cover all cases".
I don't see how this contradicts my view. I totally agree with your
statements but I don't see how they preclude looping constructs in a
Yes, loop in Common Lisp is not extensible, and this is a disadvantage.
But I am not arguing that Common Lisp provides the best possible
solution in this regard.
> Now in any other context, I would imagine that it would be you, the
> Common Lisp fan, making precisely this set of cases. So when did
> covering all cases cease to be an objective of a general purpose
> language? And if you buy into the above, then tail calls become
> inevitable; a macro system without tail calls underneath is
> fundamentally hobbled.
Yes, I am a Common Lisp fan, but this doesn't matter much for the topic
Yes, Common Lisp with proper tail recursion and call/cc would be a
Pascal Costanza University of Bonn
mailto:email@example.com Institute of Computer Science III
http://www.pascalcostanza.de Römerstr. 164, D-53117 Bonn (Germany)