Re: #;
- From: verec <verec@xxxxxxx>
- Date: Sun, 30 Dec 2007 15:37:45 +0000
On 2007-12-30 14:56:13 +0000, "John Thingstad" <jpthing@xxxxxxxxx> said:
På Sun, 30 Dec 2007 15:13:55 +0100, skrev verec <verec@xxxxxxx>:
As Josvig mentioned you need to comment out a sexp, not a line
for this you already have #| (sexp) |#
--------------
John Thingstad
This doesn't preclude \#; to actually *be* based
on line! THAT is its defined purpose!
And *I* find it usefull to be able to comment out
a _line_ with something that clearly states
"this not an ordinary line comment, but a comment-out comment".
I have seen many examples using #+nil for this
purpose, but this precisely doesn't work for
incomplete expressions whereas:
(defun foo (n)
(cond
#; treat this special case later
#; ((= n 1)
#; (foo-1 n))
((= n 2)
(foo-2 n))
(t
(general-case n))))
does, rather than
(defun foo (n)
(cond
; treat this special case later
; ((= n 1)
; (foo-1 n))
((= n 2)
(foo-2 n))
(t
(general-case n))))
But the point was more about how non-obvious it
had been for me to go from "it should be trivial
to implement" to whatever it took to make it
work the way I intended it to.
#| and |# do not work _for me_ in this case because
they either force me to scan past the end of some
line to visually spot the terminating |#
(defun foo (n)
(cond
#| treat this special case later
((= n 1)
(foo-1 n)) |#
((= n 2)
(foo-2 n))
(t
(general-case n))))
or force me to add an extra blank line for a solitary |#
(defun foo (n)
(cond
#| treat this special case later
((= n 1)
(foo-1 n))
|#
((= n 2)
(foo-2 n))
(t
(general-case n))))
or worse, have it on the same line as some other
line that is NOT excluded
(defun foo (n)
(cond
#| treat this special case later
((= n 1)
(foo-1 n))
|# ((= n 2)
(foo-2 n))
(t
(general-case n))))
Obviously a matter of taste :-)
--
JFB
.