[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Functional Paradigm popularity and Maths (Was: XML as a transition to s-expr)
I think Dan has a very important point here. One thing
that scares people about Lisp is the examples they see,
esp. in books. I noticed the difference when I tried
reading some books about other languages to see if there
was anything worth using in Arc. The first examples tend
to be straight-line Basic-like programs. You can
write these programs in Lisp too, of course, but Lisp
books tend to be written by Lisp hackers, and their idea
of a nice simple example is, say, a definition of member
or length.
Recursion is introduced on p. 16 of Ansi Common Lisp.
According to the indices, it is first mentioned on p. 115
of Programming Perl and not at all in Learning Perl.
So of course people pick up the Lisp book, and between
the parens and the formidable examples, think Lisp must
be a hard language. But of course you can write Basic
programs in Lisp, and if a Lisp hacker could bring himself
to write 100 pages of examples that were all just Basic
programs, Lisp would seem more accessible. (I'm not saying
anyone should.)
--- Dan Weinreb <dlw@exceloncorp.com> wrote:
> Date: Wed, 19 Dec 2001 04:23:06 -0800
> From: "David Simmons" <David.Simmons@smallscript.net>
>
> Lisp requires one to think in terms of "lists" and "recursion".
>
> It really can't be emphasized enough that there is no such
> requirement. You can learn Lisp and program in Lisp and write
> compilers and Ethernet drivers and graphics packages and mail readers
> in Lisp and never use lists or recursion at all.
>
> I have spent many years programming in each of Lisp, C++, and Java,
> and I use or don't use recursion under exactly the same circumstances
> independent of which of those languages I am programming in.
>
> Lists are just a data structure in the library of useful data
> structures. You use them when they're appropriate and you don't when
> they're not.
>
> (Footnote 1: the Lisps I was using did not do tail-call elimination.
> Footnote 2: Yes, you do need to learn about lists if you want to do
> Lisp macros, but you aren't "required" to use macros, particularly if
> we're comparing with a language that doesn't have that kind of macro,
> and I don't think the little kids writing in Smalltalk are dealing in
> that kind of macro.)
__________________________________________________
Do You Yahoo!?
Check out Yahoo! Shopping and Yahoo! Auctions for all of
your unique holiday gifts! Buy at http://shopping.yahoo.com
or bid at http://auctions.yahoo.com