"ȫ�浿" ha escrito:
>
> LISP began as a pure functional language
Plainly wrong, unless you swallow this code is
purely functional:
DEFINE ((
(LENGTH (LAMBDA (L)
(PROG (U V)
(SETQ V 0)
(SETQ U L)
A (COND ((NULL U) (RETURN V)))
(SETQ U (CDR U))
(SETQ V (ADD1 V))
(GO A) ))) ))
(Taken from "LISP 1.5 Programmer's Manual", p.29)
"J.L. Perez-de-la-Cruz" wrote:
>
> "È«±æµ¿" ha escrito:
> >
> > LISP began as a pure functional language
>
> Plainly wrong, unless you swallow this code is
> purely functional:
>
> DEFINE ((
> (LENGTH (LAMBDA (L)
> (PROG (U V)
> (SETQ V 0)
> (SETQ U L)
> A (COND ((NULL U) (RETURN V)))
> (SETQ U (CDR U))
> (SETQ V (ADD1 V))
> (GO A) ))) ))
>
> (Taken from "LISP 1.5 Programmer's Manual", p.29)
Lisp did not begin with Lisp 1.5. A better choice for its
starting point is the paper "Recursive Functions of Symbolic
Expressions and their Computation by Machine" by John McCarthy,
which describes an interpreter for a side-effect free language
(label but no defun, lambda binding but no setq).
Le Hibou
--
In any large organization, mediocrity is almost by definition
an overwhelming phenomenon; the systematic disqualification
of competence, however, is the managers' own invention, for
the sad consequences of which they should bear the full blame.
-- Edsger W. Dijkstra, 1986.
Donald Fisk wrote:
>Lisp did not begin with Lisp 1.5. A better choice for its
>starting point is the paper "Recursive Functions of Symbolic
>Expressions and their Computation by Machine" by John McCarthy,
>which describes an interpreter for a side-effect free language
>(label but no defun, lambda binding but no setq).
>
>
But was this the language they were using? I seem to recall getting the
impression from the early documents that this pure LISP (cause all the
languages had capitalised names back then) was just a subset used for
teaching, the next step being side-effect-ful LISP.
p.s. When did LISP become Lisp?
Barry Watson <············@uab.ericsson.se> writes:
> When did LISP become Lisp?
Common Lisp, the Language was published in 1984, so maybe the "Lisp"
spelling started in the early eighties, or late seventies?
>>>>> "Barry" == Barry Watson <············@uab.ericsson.se> writes:
Barry> But was this the language they were using? I seem to recall getting
Barry> the impression from the early documents that this pure LISP (cause all
Barry> the languages had capitalised names back then) was just a subset used
Barry> for teaching, the next step being side-effect-ful LISP.
Someone mentioned at the Lisp conference last year that in the
beginning there was no compiler. Programs were translated by hand into
Fortran.
------------------------+-----------------------------------------------------
Christian Lynbech | christian ··@ defun #\. dk
------------------------+-----------------------------------------------------
Hit the philistines three times over the head with the Elisp reference manual.
- ·······@hal.com (Michael A. Petonic)
Donald Fisk ha escrito:
> Lisp did not begin with Lisp 1.5. A better choice for its
> starting point is the paper "Recursive Functions of Symbolic
> Expressions and their Computation by Machine" by John McCarthy,
> which describes an interpreter for a side-effect free language
> (label but no defun, lambda binding but no setq).
Well... I am just a poor second hand scholar (who does not hate
scheme, by the way). However, history is history. I think you can
trust Herbert Stoyan:
(http://www8.informatik.uni-erlangen.de/html/lisp/histlit1.html)
"LISP is understood as the model of a functional programming language
today.
There are people who believe that there once was a clean "pure" language
design in the functional direction which was comprised by AI-programmers
in search of efficiency. This view does not take into account, that
around the end of the fifties,nobody, including McCarthy himself,
seriously
based his programming on the concept of mathematical function. It is
quite
certain that McCarthy for a long time associated programming with the
design
of stepwise executed "algorithms".
On the other side, it was McCarthy who, as the first, seemed to have
developed
the idea of using funtional terms (in the form of "function calls" or
"subroutine calls") for every partial step of a program. This idea
emerged more as a stylistic decision, proved to be sound and became the
basis
for a proper way of programming - functional progamming..."
J.L. Perez-de-la-Cruz wrote:
>Donald Fisk ha escrito:
>
>
>
>>Lisp did not begin with Lisp 1.5. A better choice for its
>>starting point is the paper "Recursive Functions of Symbolic
>>Expressions and their Computation by Machine" by John McCarthy,
>>which describes an interpreter for a side-effect free language
>>(label but no defun, lambda binding but no setq).
>>
>>
>
>Well... I am just a poor second hand scholar (who does not hate
>scheme, by the way). However, history is history. I think you can
>trust Herbert Stoyan:
>(http://www8.informatik.uni-erlangen.de/html/lisp/histlit1.html)
>
Who correctly (IMHO) calls it function-oriented programming.
>
>"LISP is understood as the model of a functional programming language
>today.
>There are people who believe that there once was a clean "pure" language
>
>
Doesn't the 1.5 manual describe a Pure LISP?
In article <············@ccsun2.sogang.ac.kr>, "ȫ�浿" <·@1.1> wrote:
> LISP began as a pure functional language but gradually acquired more and
> more imperative features. Why?
Because they help you to write programs that better match certain
problem domains. Here is a quote by Guy Steele and Gerald J. Sussman
from "The Art of the Interpreter" (highly recommended reading, available
from http://library.readscheme.org/page1.html):
"We wish to deal with the computer as an entity with state, which
changes over time by interacting with a user. In particular, we want the
computer to change over time by accumulating procedure definitions. [1]
Just as the user wishes to think of the computer as having state, he may
find it conceptually convenient to organize a program similarly: one
part may deal with another part having state. Often programs are written
for the purpose of analyzing or simulating a physical system. If modules
of the program are to reflect the conceptual divisions of the physical
systems, then the program modules may well need to have independent
state variables. Thus the notion of state is _not_ just a programming
trick, but may be required by the nature of the problem domain."
(Emphasis in the original text.)
Don't believe the hype from the pure functional programming camp. It
might be easier to analyze a program that is free from side effects, but
that's usually not the primary purpose of a program.
Pascal
[1] Here, they talk about Lisp programming environments.
--
"If I could explain it, I wouldn't be able to do it."
A.M.McKenzie