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

Re: RFC: New regex modifier flags; also the whimsical nature ofbackward compatibility; new 'r' flag has issues

Thread Previous | Thread Next
From:
David Golden
Date:
August 6, 2010 19:47
Subject:
Re: RFC: New regex modifier flags; also the whimsical nature ofbackward compatibility; new 'r' flag has issues
Message ID:
AANLkTimFkOqUVFjp-7h0AV6rFp=oXaRxaUwKfHw4qEgf@mail.gmail.com
On Fri, Aug 6, 2010 at 8:28 PM, Ævar Arnfjörð Bjarmason
<avarab@gmail.com> wrote:
> +0.5
>
> I must say I don't like the tradeoff of making users pound their shift
> keys in perpetuity to produce /UL instead of /ul to maintain backwards
> compatibility with an unlikely-to-occur bit of syntax.
>
> Has anyone done tests to find out if cases like C</foo/lt "bar">
> actually occur in the wild (e.g. on CPAN). Or is this just a runaway
> backwards compat hypothetical?

I think it's a hypothetical.

As I said originally, I'm 100% happy to declare run-on's to be a
syntax error, declare the parser to have a bug for not detecting it to
date, break whatever corner cases we happen to break, and just go
straight to /l and /u for modifiers.

That didn't seem to get a lot of traction and Jesse seemed to indicate
he'd prefer that kind of breakage to have lexical scope using a
feature.

Given the extra complexity of a "temporary" feature, I think uppercase
/L and /U (with the option of lower case synonyms in 5.16) is a
reasonable compromise.

-- David

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