[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

The right way



    Date: 1 February 1982 1650-EST (Monday)
    From: Guy.Steele at CMU-10A
    To:   HIC at MIT-AI
    cc:   common-lisp at SU-AI
    Re:   The right way

    I think I take slight exception at the remark

        Of course, Lambda Macros are the right way to experiment with the
        functional programming style...

    It may be a right way, but surely not the only one.  It seems to me
    that actually using functions (rather than macros) also leads to a
    functional programming style.  Lambda macros may be faster in some
    implementations for some purposes.  However, they do not fulfill all
    purposes (as has already been noted: (MAPCAR (FPOSITION ...) ...)).

Sigh...it's so easy to be misinterpreted in mail.  Of course, that meant
"Of these two approaches,..."  I'm sorry I wasn't explicit enough.

However, now it's my turn to take "slight exception" (which wasn't so
slight on your part that you didn't bother to send a note):

Have we accepted the Scheme approach of LAMBDA as a "self-evaling" form?
If not, then I don't see why you expect (MAPCAR (FPOSITION ...) ...)
to work where (MAPCAR (LAMBDA ...) ...) wouldn't.  Actually, that's
part of the point of Lambda macros -- they work nicely when flagged
by #'.  If you want functions called, then have the lambda macro
turn into a function call.  I think writing #' is a useful marker and
serves to avoid other crocks in the implementation (e.g. evaling the
car of a form, and using the result as the function.  I thought we
had basically punted that idea a while ago.)

If, however, we do accept (LAMBDA ...) as a valid form that self-evaluates
(or whatever), then I might propose changing lambda macros to be called
in normal functional position, or just go to the scheme of not distinguishing
between lambda and regular macros.