Fri, 31 May 2002 07:42:13 -0700
Let me make one more stab at explaining why Lisp macros aren't like
This string contains lisp source code:
"(defmacro add2 (x y) `(+ ,x ,y))"
The lisp compiler could compile that source code by calling
the lisp reader to parse the source code into an internal form
and then the compiler would operate on the internal form.
The result reutrned by the lisp reader is NOT lisp source code. It's an
internal form involving, in this case, pointers to objects called
conses and symbols.
the string above: lisp source code
the internal form: NOT lisp source code
Now suppose that the add2 macro were in a LLGPL'ed library and in my code
using that library I put this expression
(add2 1 2)
What does NOT happen is that this form is textually replaced by
(+ 1 2)
and then the lisp reader is called to read that sequence of characters.
That what the C preprocessor would do. That's NOT what Lisp does.
What happens in Lisp is that the lisp reader reads "(add2 1 2)"
and converts in to an internal form. That form is processed by
the compiler which then invokes the function created when
the macro add2 was loaded into Lisp. The add2 macro
returns a Lisp object in INTERNAL FORM. The add2 macro
NEVER GENERATES LISP SOURCE.
You keep trying to draw parallels between lisp macros and
C preprocessor macros or even parser generators. These
are completely different. C macros generate actual C source code
that must be read by the C compiler just like any other
piece of C source. Lisp macros do not generate Lisp source.
C macros: generate C source
Bison: generates C source
Lisp macros: do NOT generate Lisp source
One thing I will agree with you is that we'll just have to agree
to disagree on this. I strongly believe that the LLGPL is an adequate
non viral licenese in the presence of Lisp macros.
Many other people, at Franz and elsewhere, also believe this
(and we did get the advice of a lawyer on it as well).
We chose to distribute lisp libraries under the LLGPL which we
intend to use in our own commericial products so we are in fact
betting our own code that the LLGPL licence is not viral.
If you have problems with the (L)LPGL then I wish you good
luck in finding a license agreement acceptable to you.