develooper Front page | perl.perl6.language | Postings from July 2006

Re: [svn:perl6-synopsis] r9727 - doc/trunk/design/syn

Thread Previous | Thread Next
From:
Markus Laire
Date:
July 1, 2006 05:32
Subject:
Re: [svn:perl6-synopsis] r9727 - doc/trunk/design/syn
Message ID:
67d53e40607010531r3633e052n2d9d37734ce3abe5@mail.gmail.com
On 7/1/06, larry@cvs.perl.org <larry@cvs.perl.org> wrote:
> +In particular, these forms disable the lookahead for an adverbial argument,
> +so while
> +
> +    q:n($foo)
> +
> +will misinterpret C<$foo> as the C<:n> argument,
> +
> +    qn(stuff)
> +
> +has the advantage of misinterpreting it as the argument to the C<qn()>
> +function instead.  C<:)>
> +
> +But parens are special that way.  Other bracketing characters are special
> +only if they can be mistaken for adverbial arguments, so
> +
> +    qn[stuff]
> +
> +is fine, while
> +
> +    q:n[stuff]
> +
> +is not.  Basically, just don't use parens for quote delimiters, and always
> +put a space after your adverbs.

Why q:n[stuff] is not fine? Shouldn't that pass [stuff] to adverb n?

Also, in what way are parens special?
Doesn't qn(stuff) and qn[stuff] both mean same thing?
And both q:n(stuff) and q:n[stuff] pass something to adverb n. (First
passes stuff, second passes [stuff])

-- 
Markus Laire

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