develooper Front page | perl.perl5.porters | Postings from December 2019

Re: Query Parameters

From:
Tony Cook
Date:
December 3, 2019 04:59
Subject:
Re: Query Parameters
Message ID:
20191203045939.jern5vh7uwaw3c3f@mars.tony.develop-help.com
On Mon, Dec 02, 2019 at 02:08:59PM +0000, Zefram via perl5-porters wrote:
> Dave Mitchell wrote:
> >    ?$x       peek ahead to the next arg
> >    ??$x      peek ahead and see if there is a next arg
> 
> Poor Huffman coding: the latter will be used more often.  I think the
> peek-ahead cases should (all, consistently) have a second character after
> the "?" and before the sigil, and the predicate case should only have one
> "?".

I too think the shorter version should be the predicate rather than
the peek ahead.

> 
> >They cannot be a placeholder: i.e. these aren't legal: ??$, ?$, ?@, ?%.
> 
> Seems to me that those should be legal no-ops.  Except for the hash one,
> which isn't even a no-op, because it would enforce even parity of the
> remaining argument list.

I'd rather they were illegal if they're no-ops, since we might find a
later use for the syntax that isn't a no-op.

That said all this punctuation might be a bit too much, with perl's
reputation as a line-noise language being further cemented.

But COBOL lies down the other road.

Tony



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