exceptions

Michele Simionato michele.simionato at poste.it
Thu Jun 10 01:38:22 EDT 2004


hungjunglu at yahoo.com (Hung Jung Lu) wrote in message news:<8ef9bea6.0406091457.6c5ffaec at posting.google.com>...
> If there are tricks in Lisp to intercept "if", "setq", etc. I'd like
> to know. Same if these limitations are specific to some particular
> implementations of Lisp. I greatly suspect that these limitations of
> Lisp are general, since Lisp does not naturally have prototype-based
> scopes like onion-skins, and overriding things like "if" could more
> easily create havoc.
> 
> regards,
> 
> Hung Jung

Sorry for the  previous message, but I couldn't resist the temptation
to mock you. So you may realize how irritating certain statements can
be.

BTW, for the sake of other interested readers, I will point out that
in Lisp you can just wrap you code in a macro, and the macro can do 
*everything* on the source code. Including replacing all your "if" and  
"setq" with custom version of them. So practically you get what you want.
It is also explicit, since only the "if" and "setq" in the code inside the 
macro will be redefined, instead of magically change the global meaning of
your basic language, which maybe is not such a good idea.


                             Michele Simionato



More information about the Python-list mailing list