Re: Learning Lisp in Linux?
- From: Don Geddis <don@xxxxxxxxxx>
- Date: Wed, 31 Oct 2007 09:51:23 -0700
namekuseijin <namekuseijin@xxxxxxxxx> wrote on Wed, 31 Oct 2007:
On 30 out, 22:38, Don Geddis <d...@xxxxxxxxxx> wrote:
Now tell me why any kind of recursion is "the natural way" to express
iteration. Like WHILE or DOLIST or MAPCAR.
this is as natural...
...an imperative construct as one can in a functional expression.
But back up another level: what is the benefit of only using functional
expressions?
If the real algorithm is naturally imperative, your example may be the most
natural possible expression in a functional style. But there is an even MORE
natural expression in a straight imperative style. But what benefit have you
gained by obfuscating the code in order to reformulate it in a functional
style?
How does reformulating these things into a recursive algorithm improve
anything?
In Scheme and other functional languages they improve users being able to
design naturally recursive solutions recursively without fear of stack
overflows
Don't forget: we're talking about naturally _iterative_ algorithms, which
are being rewritten into a recursive style. You haven't provided any benefit
for this rewriting.
There are other algorithms were are indeed naturally recursive. And Common
Lisp programmers generally write those algorithms in a recursive style.
But CL programmers tend to write iterative algorithms in an iterative style.
I'm still waiting for you to explain why a recursive style should be used
for _all_ these algorithms.
and to schew the evil imperative paradigm in favor of more modern
approaches of software development by means of side-effect free functions
being composed together.
Tell me more about this "evil" paradigm. Sounds productive and fun!
(Or, if you want to try to be serious: eliminate your argumentative words
like "evil" and "modern", and just calmly explain the ACTUAL BENEFITS that a
programmer will see by adopting your suggested approach.)
-- Don
_______________________________________________________________________________
Don Geddis http://don.geddis.org/ don@xxxxxxxxxx
Patriotism is supporting your country all the time, and your government when
it deserves it. -- Mark Twain
.
- Follow-Ups:
- Re: Learning Lisp in Linux?
- From: namekuseijin
- Re: Learning Lisp in Linux?
- References:
- Re: Learning Lisp in Linux?
- From: Ken Tilton
- Re: Learning Lisp in Linux?
- From: Jay Belanger
- Re: Learning Lisp in Linux?
- From: Ken Tilton
- Re: Learning Lisp in Linux?
- From: Jay Belanger
- Re: Learning Lisp in Linux?
- From: Ken Tilton
- Re: Learning Lisp in Linux?
- From: Klaus Schilling
- Re: Learning Lisp in Linux?
- From: Ken Tilton
- Re: Learning Lisp in Linux?
- From: namekuseijin
- Re: Learning Lisp in Linux?
- From: Klaus Schilling
- Re: Learning Lisp in Linux?
- From: Pascal Costanza
- Re: Learning Lisp in Linux?
- From: namekuseijin
- Re: Learning Lisp in Linux?
- From: Pascal Costanza
- Re: Learning Lisp in Linux?
- From: namekuseijin
- Re: Learning Lisp in Linux?
- From: Don Geddis
- Re: Learning Lisp in Linux?
- From: namekuseijin
- Re: Learning Lisp in Linux?
- Prev by Date: Re: Install Clisp on Windows
- Next by Date: Re: Important and Urgent
- Previous by thread: Re: Learning Lisp in Linux?
- Next by thread: Re: Learning Lisp in Linux?
- Index(es):
Relevant Pages
|
Loading