Just to correct my mistake. It is "#;", not "#'", for
single-expression comment in PLT Scheme.


On Fri, May 8, 2009 at 1:53 AM, Kriangkrai Soatthiyanont
<kks...@gmail.com> wrote:
> Hi Alex and Tomas,
>
> In PLT Scheme, you can comment out a single expression with "#'" (e.g.
> ... #'(+ 1 2) ...). It would be great to have such kind of comment
> too, but I don't know how to do it easily. :-(
>
> In fact, my #{...}# syntax is inspired by the #|...|# syntax in PLT
> Scheme (but in PLT, it can be nested, unlike my implementation ;-)
>
> Best regards,
> KS
>
>
> On Fri, May 8, 2009 at 1:28 AM, Alexander Burger <a...@software-lab.de> wr=
ote:
>> Hi Tomas,
>>
>>> something which would not make me edit both ends of the commented out
>>> expression, e.g. Common Lisp #+NIL(...) is better in that sense as you
>>> can stay at the beginning all the time when commenting or
>>
>> I personally find the token '#+NIL' a bit too long (a typical Common
>> Lisp style). I like Kriangkrai's syntax '#{', as the '#' denotes a
>> comment and the '{' a block (and not necessarily a Lisp expression).
>> Also a nice fact is that '{' is used only in external symbols so far,
>> and will not conflict much with other things.
>>
>>
>> BTW, I don't know if you are aware of it, but there is a nice "trick"
>> which I use occasionally to comment a whole expression: The good old
>> quote :-)
>>
>> =A0 '(de foo ()
>> =A0 =A0 =A0...)
>>
>> If you use it inside of expressions, though, you must take care of what
>> it means in that context:
>>
>> =A0 (de foo ()
>> =A0 =A0 =A0(doThis)
>> =A0 =A0 =A0'(doThat)
>> =A0 =A0 =A0(doSomethingelse) )
>>
>> will successfully comment (doThat), without any other side effect, but
>>
>> =A0 (de foo ()
>> =A0 =A0 =A0(if (bar)
>> =A0 =A0 =A0 =A0 '(doThis)
>> =A0 =A0 =A0 =A0 (toThat) ) )
>>
>> might not behave as expected.
>>
>>
>>> I think unescaping strings does not scale, using it in all sorts of
>>> templates usually leads to a mess. =A0It's much better to stay in the
>>> "lisp world" as opposed to the "string world" I think;-)
>>
>> Very true.
>>
>> Cheers,
>> - Alex
>> --
>> UNSUBSCRIBE: mailto:picol...@software-lab.de?subject=3dunsubscribe
>>
>
-- 
UNSUBSCRIBE: mailto:picol...@software-lab.de?subject=unsubscribe

Reply via email to