Offer Kaye wrote:
>  #(  commenting out a large code section, yey for Perl6 multi-line comments...
>    if ($foo) {
>       print "...or not :(\n"
>    }
> ) # this should have been the end of the embedded comment

...and since it wasn't, you probably should have chosen other brackets such as:

 #[[  commenting out a large code section, yey for Perl6 multi-line comments...
   if ($foo) {
      print "...or not :(\n"
   }
]]

or just used POD sections:

=begin comment
   if ($foo) {
      print "...or not :(\n"
   }
=end comment

> Comments are a some of the most commonly used constructs in code.
> Every code has them, even the simplest script. If you have to "get
> around" a limitation whenever using them (your words - "but it's easy
> enough to get around that restriction") you're doing something wrong
> with their design.

My words; not the designer's.

> Where is the sense in making the closing of the
> embedded comment a single bracket only?

It seems so natural to me that I find myself wondering how it can be
thought of as nonsense.

> I think the Perl 5 method of having just # for single-line and =pod
> for multi-line was better.

IMHO, the _only_ problem with the current commenting system is that
there's potential ambiguity when you start a line with '#('.  Many of
us find that the benefits of having embedded comments outweigh this
one flaw.

> Yes simple Perl users I know didn't use
> =pod but it was there if they needed it.

It still is.  Embedded comments do not replace POD sections any more
than they replace traditional line comments.

-- 
Jonathan "Dataweaver" Lang

Reply via email to