[comp.lang.lisp] Linking

gateley@m2.csc.ti.com (John Gateley) (11/13/89)

In a bunch of articles, people have been mentioning the problem
with linking: read, apply, eval/compile etc. They have missed
a couple, and actually, the ones they missed are the heart of the
problem:

Intern, and symbol-function.

Intern is particularly bad, because you can intern the string
"CAR" in the lisp package, and get a symbol which has a function
definition. Intern is what makes read and all the other guys bad.

symbol-function is kind of bad. It means that you have to include
all the function definition for all symbols used as data in you program.
But, unless intern appears, all the symbols are there to be examined.

John
gateley@m2.csc.ti.com

barmar@leander.think.com (Barry Margolin) (11/14/89)

In article <97923@ti-csl.csc.ti.com> gateley@m2.UUCP (John Gateley) writes:
>symbol-function is kind of bad. It means that you have to include
>all the function definition for all symbols used as data in you program.
>But, unless intern appears, all the symbols are there to be examined.

You were right about INTERN (and its brother, FIND-SYMBOL), but I don't
think SYMBOL-FUNCTION is as bad.  It's likely that if a symbol with a
function definition is used as data that its function definition is the
interesting thing about it, so those function definitions are probably not
wasting space.  CAR is probably the only exception, and only in automotive
applications.

SYMBOL-FUNCTION is no worse than FUNCALL, APPLY, or any other function that
takes a functional argument, since they can all invoke SYMBOL-FUNCTION
implicitly.

Making Lisp easy to compile into small binaries was never a goal of X3J13.
Much of what makes Lisp as great as it is goes contrary to that goal.
Barry Margolin, Thinking Machines Corp.

barmar@think.com
{uunet,harvard}!think!barmar