From ... Path: archiver1.google.com!news1.google.com!sn-xit-02!supernews.com!news.tele.dk!small.news.tele.dk!193.190.198.17!newsfeeds.belnet.be!news.belnet.be!news2.kpn.net!news.kpn.net!nslave.kpnqwest.net!nloc.kpnqwest.net!nmaster.kpnqwest.net!nreader2.kpnqwest.net.POSTED!not-for-mail Newsgroups: comp.lang.lisp Subject: Re: #+,#- etc. (Re: Behaviour of #'directory) References: <3c923d85.214813000@nntp.interaccess.com> <3224437278089234@naggum.net> Mail-Copies-To: never From: Erik Naggum Message-ID: <3224454424845597@naggum.net> Organization: Naggum Software, Oslo, Norway Lines: 39 User-Agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.1 MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Date: Thu, 07 Mar 2002 01:46:56 GMT X-Complaints-To: newsmaster@KPNQwest.no X-Trace: nreader2.kpnqwest.net 1015465616 193.71.199.50 (Thu, 07 Mar 2002 02:46:56 MET) NNTP-Posting-Date: Thu, 07 Mar 2002 02:46:56 MET Xref: archiver1.google.com comp.lang.lisp:28018 * Kent M Pitman | Did it allow for multiple cases? The usual problem that alternatives to | #+/#- try to address is the desire for #+otherwise. That is, when you | have | | #+(or Genera (and (not Win32) Franz)) (foo) | #+(and CLIM (not PDP10)) (bar) | #+(or (not CLIM) linux) (baz) | | you sometimes wonder what cases are not handled. of course you could | write: | | #-(or Genera (and (not Win32) Franz) (and CLIM (not PDP10)) (not CLIM) linux) | | but you might forget to edit it if another case is inserted. Suppose this is used to support a particular feature, say mumble-frotz. Each positive form could then provide the feature. A minute amount of macrology should make it possible to provide a feature more easily. Maybe something like this: (defmacro maybe-provide-feature (feature &body body) (when body `(progn ,@body (pushnew ,feature *features*)))) Then we could simply wrap the above example in like this: (maybe-provide-feature :momble-frotz #+(or Genera (and (not Win32) Franz)) (foo) #+(and CLIM (not PDP10)) (bar) #+(or (not CLIM) linux) (baz)) #-mumble-frotz (error "mumble-frotz is unavailable on this system") ; or whatever /// -- In a fight against something, the fight has value, victory has none. In a fight for something, the fight is a loss, victory merely relief.