develooper Front page | perl.perl6.language | Postings from August 2009

Re: Embedded comments: two proposed solutions to the comment-whole-lines problem

Thread Previous | Thread Next
From:
Jim Cromie
Date:
August 11, 2009 08:35
Subject:
Re: Embedded comments: two proposed solutions to the comment-whole-lines problem
Message ID:
cfe85dfa0908110835u33785e96w796469e2d91c1bf9@mail.gmail.com
On Tue, Aug 11, 2009 at 8:59 AM, Jon Lang <dataweaver@gmail.com> wrote:

> Ben Morrow wrote:
> > However, I would much rather see a general syntax like
> >
> >    (# ... )
> >    {# ... }
> >    [# ... ]
> >
>

a preceding ':' (colon) makes it *notionally*
a null-label-block-comment-construct.


>
> > with no whitespace allowed between the opening bracket and the #: this
> > doesn't seem to conflict with anything. Allowing <# ... > in rules would
> > also be nice.
>
> That's rather elegant.  It's no longer than the current embedded
> comment syntax, and avoids the start-of-line issue.  The only
> complication arises when you prepend the brackets with a quote or
> pseudo-quote character:
>
>   say q(# is this a string or a comment?); # DWIM -> string.
>
> --
> Jonathan "Dataweaver" Lang
>


Thread Previous | Thread Next


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About