Subject: Re: some corrections Re: The Fundamental Problems of Lisp
From: rpw3@rpw3.org (Rob Warnock)
Date: Sun, 13 Jul 2008 20:36:01 -0500
Newsgroups: comp.lang.lisp
Message-ID: <6vednejQcbIcMOfVnZ2dnUVZ_jednZ2d@speakeasy.net>
Vassil Nikolov  <vnikolov+usenet@pobox.com> wrote:
+---------------
|   That is not entirely true.  XEmacs, at least, implements the `#+'
|   syntax, which can be used to comment out well-formed S-expressions...
...
|     #+(or) (
|     (bar)
|     (baz)
|     )
|   (FOO) and (BAR) are effectively commented out...
+---------------

Ever since a long-ago thread [in which Erik Naggum was an active
participant, so that tells you how long ago it was!!] in which
this style was presented as a better alternative to #+NIL [which
can break if :NIL ever got onto *FEATURES*], I've found it rather
distasteful -- *not* because there's anything technically "wrong"
with it [there's not], but because of the cognitive dissonance of
the "+" implying the exact *opposite* of what you're trying to do!!
Ditto "#-(or)" to un-comment something -- flat-out backwards! So
ever since then I've been using Erik's suggestion from that thread:

    #+(and) to *enable* an S-expression.

    #-(and) to "comment out" an S-expression.

Now the "+"/enable and "-"/disable semantics line up:

      #-(and) (  ;turn off (BAR) & (BAZ)
      (bar)
      (baz)
      )

Yes, using AND is one character longer than using OR, but
reading it [by humans!] is simply more reliable.


-Rob

p.s. O.k., confession time: Even more recently I've started getting
a bit lazy and using "#-+" to enable and "#+-" to comment out.
My mnemonic is that "#-+" represents a "rising edge", that is,
goes "from off to on" (enables), while the "falling edge" "#+-"
goes "from on to off" (*dis*ables). Yes, it depends upon
(INTERSECTION '(:+ :-) *FEATURES*) being NIL, but that's
really, *really* unlikely to be violated.

-----
Rob Warnock			<rpw3@rpw3.org>
627 26th Avenue			<URL:http://rpw3.org/>
San Mateo, CA 94403		(650)572-2607