On Tue, Apr 11, 2006 at 12:54:50PM +1200, Sam Vilain wrote:
: Larry Wall wrote:
: 
: >On Tue, Apr 11, 2006 at 12:26:13PM +1200, Sam Vilain wrote:
: >: This does mean that if you comment out blocks with s/^/#/, you mess up on:
: >: 
: >: #sub foo
: >: #{
: >: #  if foo { }
: >: #}
: >
: >Well, actually, that still works.  
: >  
: >
: 
: Oh, true :-)
: 
: But this fragment dies:
: 
:  #sub foo
:  #{
:  #  bar { } unless baz
:  #}
: 
: 
: Unless you consider the idea of balancing the {}'s inside the comment,
: which I think would be just plain nasty.

I don't see how that's different at all from the first example.

: The #* .. *# form actually has a natural follow-on I didn't think of before:
: 
:       #[ This is a comment ]#
:       #( This is a comment )#
:       #{ This is a comment }#
:       #< This is a comment >#
:       #« This is a comment »#
: 
: While technically the same thing applies to code that uses these
: delimited, it means that the block I gave is now a parsefail.
: #-comments directly following closing braces are probably sufficiently
: uncommon for this not to be such a problem.

Yes, Audrey made that suggestion too, but I think it's uglier for
the envisioned uses.

: >To be certain though, you could always
: >use s/^/##/ or s/^/# /.  
: >  
: >
: 
: I guess that works, but it breaks convention of # somewhat.

You may have noticed that I don't mind breaking conventions somewhat.  :-)

: >Even better is:
: >
: >    =begin UNUSED
: >    sub foo
: >    {
: >      if foo { }
: >    }
: >    =end UNUSED
: >
: >And I don't really care if that's not what people are used to.
: >The whole point of Perl 6 is to change How Things Work.
: >  
: >
: 
: Sure, but there is still the principle of least surprise to worry about.

The problem with the Principle of Least Surprise is that you can use it
to justify just about anything by picking the right set of people.  :-)

I freely admit that the current definition will surprise a few Perl 5
programmers.  I'm more worried about what will look clean in 10 years.

Larry

Reply via email to