On Thu, Jan 30, 2003 at 02:13:13PM -0500, Matthew Danish wrote:
> On Thu, Jan 30, 2003 at 10:30:33AM -0800, Wayne O. Cochran wrote:
> > If one could not redefine the builtin functions then
> > one would have to keep mental track of the very large
> > set of functions, macros, etc... that are predefined
> > in Lisp. 
> 
> This is why packages are used.

Actually, I think it's not all that easy to use packages to protect
yourself from this. If you want your package to be convenient to work
in, you probably (USE :CL), and once you do that, if you absentmindedly
write e.g.
  (DEFUN CLEAR-INPUT (...) ...)
or
  (DEFUN SLOT-VALUE (...) ...)
possibly in some context that has little to do with CL:STREAM values
or CLOS, you will lose.
 
> > Also, even if one could not redefine the builtin
> > functions, the problem should manifest itself
> > at definition time:
> > 
> > * (defun max (a b) (if (> a b) a b))
> > MAX
> > * #'max
> > #<Interpreted Function MAX {4801E451}>
> > 
> > Everythings seems fine at this point. Shouldn't
> > I have at least been issued a warning of some sort?!?
> 
> Yes, it could be desirable, and implementations such as Allegro will do
> so.  Someone else posted some code that could achieve a similar effect
> in CMUCL, you may want to investigate that.  I haven't run into the
> problem myself.

So yes, it's probably good for implementations not to do the
full-blown exuberant nasal demons thing on this one, and if I get
around to it, I'll probably make SBCL handle this with CERROR.

-- 
William Harold Newman <[EMAIL PROTECTED]>
Furious activity is no substitute for understanding. -- H. H. Williams
PGP key fingerprint 85 CE 1C BA 79 8D 51 8C  B9 25 FB EE E0 C3 E5 7C

Reply via email to