function redefinition, was: redefining macro as a function?



--- C Y  wrote:

> Just curious - what would your reaction be to Wolfgang's proposal to
> add hooks to the code, which would allow a package to effectively
> redefine macsyma-eval on a per package basis?  Would that be a little
> less intrusive?  My concern is loading multiple packages would then
> of necessity wipe out earlier changes, barring careful protective
> mechanisms and/or user coding, but I'm willing to give it a try if
> the majority agrees this is a prefered way.

In some sense all functions are subject to redefinition
at any time, since there nothing to stop a programmer
from doing (setq save-meval (symbol-function meval))
(defun meval (x) (cond (...) (t (funcall save-meval x))))
whenever they feel like it.

By the way multiple redefinitions chain together in this
scheme -- if package 1 is loaded then package 2, package 2's
redefinition punts to package 1's, which punts to the
original definition. No extra work to do here and if I'm
not mistaken this is just what we want.

Given that I wonder what a hook mechanism buys us --
it seems like a more cumbersome way to achieve something
we can do already. 

For what it's worth,
Robert Dodier


		
__________________________________ 
Discover Yahoo! 
Use Yahoo! to plan a weekend, have fun online and more. Check it out! 
http://discover.yahoo.com/