Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl-Sensitive Sunglasses
 
PerlMonks  

Re^3: Multi-line comments in perl code?

by jdporter (Canon)
on Jul 14, 2006 at 19:02 UTC ( #561295=note: print w/ replies, xml ) Need Help??


in reply to Re^2: Multi-line comments in perl code?
in thread Multi-line comments in perl code?

Ow. Would it be too much to ask that it accept any sequence of openingbrackets — e.g.

#<<<
#<{[
because I could easily see myself wanting to comment out blocks of code with unbalanced closing brackets of all four types (or, more to the point, a dynamic selection of closing bracket types). Having an unlimited variety of comment "identifiers" also facilitates arbitrarily nesting comments without artificial restrictions.

We're building the house of the future together.


Comment on Re^3: Multi-line comments in perl code?
Re^4: Multi-line comments in perl code?
by marklark (Initiate) on Jul 14, 2006 at 22:46 UTC
    If I read it correctly, Damian said, "It is closed by the corresponding closing bracket." [Emphasis added]

    So, the compiler ignores the non-corresponding closing brackets.

Re^4: Multi-line comments in perl code?
by TheDamian (Priest) on Jul 15, 2006 at 00:23 UTC
    Ow. Would it be too much to ask that it accept any sequence of opening brackets
    Not to much to ask at all. At least, not as long as you can be satisfied with multiple repetitions of the same delimiter character. From the latest update of Synopsis 2:
    • For all quoting constructs that use user-selected brackets, multiple, adjacent, identical opening brackets must always be matched by an equal number of adjacent closing brackets. Bracket counting naturally applies only to sets of brackets of the same length:
          say #{{
              Comment contains unmatched } and { { { { plus a counted {{ ... }} pair.
          }} q<< <<woot>> >>   # says "<<woot>>"
      Awww, that will break my Emacs folding-mode (folding.el), which assumes folding start # {{{ and folding end # }}}

      Bye
       PetaMem
          All Perl:   MT, NLP, NLU

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://561295]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others chanting in the Monastery: (12)
As of 2014-09-30 21:05 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    How do you remember the number of days in each month?











    Results (384 votes), past polls