David Green wrote:
> Ruud H.G. van Tol:

>>Perl6 could introduce (lexical, nestable) comment scope.
>>Has that been discussed before?
>
> I think someone might have mentioned it once.  Officially you can use
> # or make arbitrary POD sections.

I don't think that covers what I mean. It was thinking about overlapping
scopes of code and comments, under strict with the requirement that the start
and end of the comment scope must be at the same code scope level.

Dumb example follows:

  #{# Process the whole file.
  while (<>) {
    #{# Process a line.
    [...]
    #{# bug fix by Ruud and Mary
    #           2005-10-24 13:10
    [...]
    #}#
    [...]
    #}#
  }
  # Finished processing the whole file.
  #}#

The code lines are 'real code', not 'commented out' code.

The comment region information can also be used by an editor to represent
collapse parts of the code by a short comment.

-- 
Affijn, Ruud

Reply via email to