Skip to content

Relation between Common Lisp and Interlisp macros needs better explanation #1094

@masinter

Description

@masinter

Originally posted by @pamoroso in Interlisp/Interlisp.github.io#70 (comment)

Moving to a "documentation" issue in the Medley repo.

Interlisp does not have a special function for defining macros. Macros are defined by placing their definition on the property list of the symbol.

Didn't Interlisp eventually add support for DEFMACRO?

I started to edit this text, but had trouble; I thought it deserved a separate issue and some thought. The relationship between Common Lisp and Interlisp is often described in terms of "In Interlisp XXX, while in Common Lisp YYYY", as it was when you had to choose one or the other for your entire application. In Medley, though, you can use both intermixed to a large degree. The explanation of exactly when the differences matter is complex.

For macros, there are Interlisp-style macros (defined by putting an IL:MACRO property on the litatom/symbol) and Common Lisp macros (defined by DEFMACRO, which is the same (EQ 'CL:MACRO 'IL:MACRO).) CL:EVAL and IL:EVAL differ in how they treat variable scoping, as do CL:LAMBDA and IL:LAMBDA. There are two compilers but CL:COMPILE-FILE and CL:COMPILE will compile both.

The introductory document doesn't seem like the place to elaborate those distinctions, and for the casual user it's probably better to keep things simple.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    Status

    No status

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions