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

Re: qr stringification: why are xism always present? I'm worriedabout backward compatibility

Thread Previous | Thread Next
From:
Aristotle Pagaltzis
Date:
August 9, 2010 08:37
Subject:
Re: qr stringification: why are xism always present? I'm worriedabout backward compatibility
Message ID:
20100809153655.GB15331@klangraum.plasmasturm.org
* Ben Morrow <ben@morrow.me.uk> [2010-08-05 20:35]:
> * Aristotle Pagaltzis <pagaltzis@gmx.de> [2010-08-05 19:45]:
> > > > * karl williamson <public@khwilliamson.com> [2010-08-04 15:40]:
> > > > >FWIW, I have given this some thought, and came to the
> > > > >conclusion that Perl is almost certainly never going to
> > > > >change the defaults, because of the backward
> > > > >compatibility issues.
> >
> > If the meaning of `(?~:)` is not allowed to change, then it
> > will no longer be an accurate representation, so patterns
> > will have to stringify to `(?~Xy:)`.
>
> Wrong. (?~:), with no further flags, means 'The default,
> whatever that happens to be in this version of perl'.

Don’t tell me – tell Karl. :-)


* karl williamson <public@khwilliamson.com> [2010-08-07 16:25]:
> I guess I'll drop this too, as I'm apparently the last person
> who thinks it is a good idea.  The problem with I see in
> Aristotle's suggestion is that how do people get trained?  It's
> not an obvious solution or we wouldn't have the various cases
> where things break.

Yeah, that is indeed a concern. At minimum it would have to be
included somewhere in the regex documentation for copypasting;
probably at minimum where `qr//` is documented.

Also, a scan of CPAN for `xism` should reveal places where people
have done it the old way; me and/or someone else(s) could go
through these and contact the maintainers or even send patches.

Regards,
-- 
Aristotle Pagaltzis // <http://plasmasturm.org/>

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