Re: [RFC] Draft Proposal for New Python Syntax

Mark S. Riggle (
Fri, 27 May 1994 15:21:20 GMT

In article <>, writes:
|> Ah, the infamous "first class objects" argument again. Really, I
|> don't understand all the fuzz about lambda, and I don't see why its
|> introduction made functions any more first class than they already
|> were in Python. They are entirely syntactic sugar for local function
|> definitions. Everything you can do with lambda you could always do
|> with local functions, at the cost of one local temporary identifier --
|> surely no big deal!

Perhaps I do not understand if your point is about lambdas in Python
or lambdas in general. I thought a lambda in a "first class objects"
argument is not like a local function definition at all because of the
lexical scoping of variables. The lambda in a functional language is
more like syntactic sugar for a class definition that has only one
method and then creating an instance of it. The class definition
needs to hold all the unbound variables occuring in the lambda body
and the creation of the instance sets those values. A good lisp
compiler can do a lot of optimization of a lambda environment.
Lambdas are useful for much more than making function arguments for
map and reduce operators.

Mark Riggle                         | "Give me LAMBDA or                  |  give me death"
SAS Institute Inc.,                 |
SAS Campus Drive, Cary, NC, 27513   |  
(919) 677-8000                      |