[comp.lang.functional] Is Lisp in class X?

pop@cs.umass.edu (05/26/90)

Re. article. <21581@megaron.cs.arizona.edu>, by David Gudeman.

I would say that most Lisps fall short of being in X because they do not
provide a proper treatment of function variables i.e.  you cannot say
(F X1 .... XN)  where  F is a variable - you have to do some funny
circumlocution which I don't remember. The binding of functions to function
names in LISP is of a different nature from variable bindings.

Scheme, somewhat tardily, provides a LISP dialect that gets it right. Oddly,
one of the reasons that Edinburgh got it right earlier (POP-2 -> Hope -> ML)
is that we had available a machine, the Eliot 4100 series, with an
instruction code designed by C.A.R.Hoare (et.al) c.1965. Hoare is not usually
thought of in that sort of role... I believe that he had Algol 60 in mind:
I do not think it was a very good Algol machine, since it was short of 
registers that could be used to implement a display, but the machine 
easily supported compilation of functional languages with little static 
typing, since it provided stacking instructions, an INDIRECT subroutine call,
and user-definable extracodes. In particular, the indirect subroutine call,
which was an unusual feature, made it natural to implement all function 
identifiers as variables. It also made it easy to do incremental compilation, 
with the function as the minimum unit of recompilation, and to write tracing 
procedures in the user language.


Robin Popplestone.

jeff@aiai.ed.ac.uk (Jeff Dalton) (06/04/90)

In article <14810@dime.cs.umass.edu> pop@cs.umass.edu () writes:
>I would say that most Lisps fall short of being in X because they do not
>provide a proper treatment of function variables i.e.  you cannot say
>(F X1 .... XN)  where  F is a variable - you have to do some funny
>circumlocution which I don't remember. 

Another in the Traditional Complaints series ("Collect them all!").

Since this has already been debated, at length, in Comp.lang.lisp,
let me just say that opinions differ as to how significant it is
that in some Lisps the syntax for calling function values (it's
any function-valued expression, not just variables) is something
like (funcall f x1 ... xn) or (apply* f x1 ... xn) rather than
just (f x1 ... xn).

>The binding of functions to function names in LISP is of a different
>nature from variable bindings.

One could just as well say they have the same nature but happen to
be independent.

>Scheme, somewhat tardily, provides a LISP dialect that gets it right.

Tardily, i.e., in 1975.

Lisp 1.5, which also lets you write (F ...), goes back at least to
1962.

>one of the reasons that Edinburgh got it right earlier (POP-2 -> Hope -> ML)

I would not say Pop got it right, because (1) variables in Pop have
dynamic scope and (2) closures have to have an explicit annotation
listing the variables to close over [cf FUNCTION in Lisp 1.5].  I
regard these as more significant defects.

-- Jeff

kers@hplb.hpl.hp.com (Chris Dollin) (06/04/90)

Jeff Dalton says:

   I would not say Pop got it right, because (1) variables in Pop have
   dynamic scope and (2) closures have to have an explicit annotation
   listing the variables to close over [cf FUNCTION in Lisp 1.5].  I
   regard these as more significant defects.

Older Pop didn't get it right, tis true. However, current versions of Pop11
(Aaron can supply dates - lest's just say for at least a couple of years)
have had full lexical scoping - ie non-dynamic scope and implicit closures.

I, too, would regard their absence as a significant defect. Conversely, I
regard the explict presence of partial application ("consclosure") as a +ve 
feature.

Regards, Kers.