> "Stuart Cook" schreef:
> > Larry Wall:
> 
> >>     if 0 {
> >>     ...
> >>     }
> >
> > The one disadvantage of that approach is that it will break if the
> > "commented-out" code temporarily fails to compile.
> 
> How frequent does that happen?
All the time. I often comment out bits of code while I'm refactoring or
such, because I've removed some functions or that the code depends on
s.t. it won't compile any more, I want to compile it to check that the
bits I've done work, and I want the commented-out code visible to remind
me to rewrite it later.

> And in that case s/if 0/\#/, as Luke mentioned.
> And if the compile failure has to do with {}, use other braces.
As you say, alternatives are available.

> But would the following work?
> 
> 0 or q:to/END42/
>   ...
> END42
Shouldn't it be C<0 and> if you don't want the RHS (or C<1 or>, I
suppose)? In either case, wouldn't this have the side-effect of setting
the last-evaluated value, which might also be undesired.

-- 
I will take my life into my hands And I will use it.    'MacArthur Park'
I will win the worship in their eyes And I will lose it.      Jimmy Webb
I will have the things that I desire        (( http://surreal.istic.org/
And my passion flow like rivers to the sky  (( It's like a DEATH CIRCUS!

Attachment: pgpsHubb64lJ2.pgp
Description: PGP signature

Reply via email to