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

[no subject]

    Date: Thursday, 14 July 1983, 16:47-EDT
    From: Bernard S. Greenberg <BSG%SCRC@MIT-MC>

    ... I had often thought of compiling a little functionelle for each
    top-level form.

I basically like this idea. You'd of course have to check first that it didn't 
macroexpand into def-forms, eval-when, etc. Just define (FOO) to mean
the same as (DEFUN G0001 () (FOO)) (G0001). It wouldn't have to be implemented
the same; just have equivalent behavior.

I seem to recall that the reason (or one of the reasons) for Maclisp not
compiling random toplevel forms was due to address space. Binary space can't
(straightforwardly) be reclaimed, so things like Macsyma which were address-
space critical wanted to do lots of set-up stuff as toplevel forms so it 
could all be GC'd. Even on large address space machines, I could see 
putting such definitions on their own pages so they could get reclaimed while
leaving the rest of the definitions loaded with them near each other to
reduce paging. 

Taking this scheme literally might also mean compiler warnings for special
vars, undefined functions, etc. I think I could even learn to like that.

Technically, people can currently write
 (PROGN (DEFUN F () (FOO ...))
        (DEFMACRO FOO ...)
and expect to win. FOO could even call F if the writer were creative.
I'm willing to claim such code is bogus. The user can always fall back on
 (EVAL '(...))
if he wants truly uncompiled code.