exceptions
Michele Simionato
michele.simionato at poste.it
Thu Jun 10 16:30:58 EDT 2004
Jacek Generowicz <jacek.generowicz at cern.ch> wrote in message news:<tyf8yevdgoz.fsf at pcepsft001.cern.ch>...
> I'm pretty sure that Scheme allows you
> to do this without any restriction.
Indeed. I knew it was possible to redefine macros but I did not expect
it was possible to redefine "built-in" "globally" so easily:
(define-macro (if c . args)
''surprise!)
(display (if #t 'true 'false)) ;=> surprise
By "globally" I mean that everything that depends of "if" will be modified:
(display (when #t 1)) ;=> surprise
which is a recipe for disasters. So I see the logic of the restriction
in Common Lisp.
Michele Simionato
More information about the Python-list
mailing list