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

suggested compiler feature.



(compiler-unwind-protect <form> <protected-forms ...>)

The semantics of this are simple, during alpha conversion <form>
is the expression which is the *value*, but the <protected-forms> are
evaluated even if the alpha conversion of <form> causes some error.

Also: atomic-macro-of-the-first-kind.

Which would have the following actions given that <FOO> has such 
a property:

A free <FOO> => <expansion of FOO>
(setq <FOO> X) => (setf (expansion of FOO> X)

((lambda (<FOO>) <FORM>) X) => dissables the macro property of <FOO>
during the expansion of <FORM>. i.e. LAMBDA is a truely transparent.
If one wants to (BIND ((<FOO> ...)) ...) then some special BIND
form must be used. This is of course incompatible with the
existing semantics of special variables, but perhaps special variables
should be changed.

One motivation: for these things in maclisp and lmlisp is an
implementation of closures with lexically scoped instance
variables.

The claimed need for "compiler-unwind-protect" is that it is
not kosher for macros to call the compilers macro-expander.

-gjc