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

Another omission: global lexicals



Seriously Dan, if you fellows go before the ISO and say that
    "The oft-discussed:"

    (let ((a 4))
      (defun foo (x) ...)
      (defun bar (y) ...)
    )

is vague with respect to legality in Common Lisp the USA is going to
look pretty wimpy. Maybe it wouldn't be so vague if more implementations
took the extra trouble (or, what is better, the extra level of uniformity
and generality of treatment) to implement it. Certainly anybodies
CL interpreter would have to either be very broken or being going
out of its way to make this not work at top level:

 (let ((a 4))
   (setf (symbol-function 'foo) #'(lambda (x) ...))
   (setf (symbol-function 'bar) #'(lambda (y) ...)))

So whats the big deal about passing the same thing to a compiler?
Some compilers may not compile the lambda expressions, but a user
could rightly say that is a bug, the compiler generating slow code
instead of good machine code.