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

Re: Issue EVAL-WHEN-NON-TOP-LEVEL, v2



I think it would be a VERY BAD IDEA to have EVAL-WHEN "not pass top-level-ness"
on to its forms.  Yes, that would break user code - it would break existing
macros (including lots of system-defined things like DEFSTRUCT if they 
weren't majorly changed), and how would you rewrite these things to make them
work in such a world?  
Many common uses of EVAL-WHEN would have different behavior.  e.g.:
(eval-when (compile load eval)
 (proclaim '(special foo))   ; make FOO special to compiler and in compiled code  
 (defun some-function (...) ...)  ; make a function definition available, etc.
 (define-setf-method ...)         ; you get the idea by now...
 ...
)
If we are to be sensitive to top-level-ness, as the direction seems to be,
then taking top-level-ness away in such a common situation after we have
established unique behavior for certain forms at top level would be a
grave mistake.