Re: Language keywords or special forms in Lisp

From: Tim Bradshaw (tfb+google_at_tfeb.org)
Date: 06/10/04


Date: 10 Jun 2004 09:04:48 -0700

Edi Weitz <edi@agharta.de> wrote in message news:<87oensfiui.fsf@bird.agharta.de>...

> 4. You can create your own package (read the standard section about
> packages) and "shadow" symbols like IF and SETQ to create the
> behaviour you want.

Just to blow my own trumpet, if you use conduits you can do:

(defpackage :cl/my-if
  (:use)
  (:extends/excluding :cl #:if)
  (:export #:if))

And now CL/MY-IF is just like CL, but CL/MY-IF:IF is not the same as
CL:IF.

Of course you can do this without conduits, but it's more typing (a
lot more typing in fact).

--tim