develooper Front page | perl.perl5.porters | Postings from November 2010

Re: [PATCH] deprecate ?PATTERN?

Thread Previous | Thread Next
From:
Jesse Vincent
Date:
November 24, 2010 08:41
Subject:
Re: [PATCH] deprecate ?PATTERN?
Message ID:
20101124164059.GW3954@fsck.bestpractical.com



On Wed, Nov 24, 2010 at 10:01:44AM +0100, Abigail wrote:
> On Wed, Nov 24, 2010 at 09:27:50AM +0100, Rafael Garcia-Suarez wrote:
> > On 24 November 2010 08:57, Zefram <zefram@fysh.org> wrote:
> > > In discussing (on #p5p) possible new operators, we ran into the issue
> > > that the obscure ?PATTERN? syntax gets in the way of most uses we could
> > > potentially make of the question mark.  It was proposed that we could
> > > deprecate that syntax to reclaim the question mark.  Attached patch
> > > does so.  It leaves the match-once semantics still available through
> > > m?PATTERN?.
> > 
> > I'd be a bit nostalgic of this venerable piece of sed-like syntax, but
> > I would not object to the deprecation.
> > 
> > Can you give an example of future usage of "?" you were thinking about ?
> 
> 
> I suggest we first have some actual cases where having "?" is a 
> hindrance. IIRC, in a recent situation where it was a "hindrance"
> it was that in the many proposed names for the '&&->' operator, '->?'
> would conflict with existing syntax.
> 
> But there were enough other possibilities left for many rounds of
> bikeshedding. I did not get the impression ?PATTERN? really stood
> in the way of progess.
> 
> I do not have much love for ?PATTERN?, which, except for some obfuscation,
> I have never used, nor have I encoutered it on code I had to maintain.
> But this smells a bit like deprecation for the sake of deprecation, and
> that always makes me uneasy.
> 

It was deprecated in 5.000:

http://perl5.git.perl.org/perl.git/blob/a0d0e21ea6ea90a22318550944fe6cb09ae10cda:/pod/perlop.pod#l584

Given that it's deprecated and we warn about deprecations, we should be
warning about it. I don't have a strong need to actually remove it until
it significantly impedes progress. 

-Jesse

> 
> 
> Abigail

-- 

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