Front page | perl.perl5.porters |
Postings from October 2021
Re: review of perlexperiment, 2021-10
Thread Previous
|
Thread Next
From:
Karl Williamson
Date:
October 5, 2021 15:48
Subject:
Re: review of perlexperiment, 2021-10
Message ID:
6fe01434-93c2-9f16-a100-0d2263440809@khwilliamson.com
On 10/3/21 2:41 PM, Ricardo Signes wrote:
>
> *private character hooks *— It's not clear to me that this is actually
> intended for use outside of core, in which case I don't know that it
> needs to be considered much. My question is: By what criteria would we
> ever decide to change the status of this code? #18758
> <https://github.com/Perl/perl5/issues/18758>
I added this hook for a module I still intend to write. I originally I
thought I would get done before the next release came out, and that
people could start using it immediately from cpan instead of waiting for
that release. But that didn't happen. I made it experimental so as to
preclude someone else writing a module before the interface was really
nailed down.
>
> *Unicode property wildcards* — I believe this is not receiving enough
> use to really warrant a clear result from use testing, so the question
> is the nearly same as above: By what criteria would we ever decide to
> change the status of this design? While we might change the guts later,
> is the design right? (Design is the key question about experiments,
> with implementation mattering most when it affects the practicality fo
> the design.) #18759 <https://github.com/Perl/perl5/issues/18759>
My understanding has always been that Perl intends to support the
Unicode regex requirements. I wrote this only because it is in Unicode
https://www.unicode.org/reports/tr18/proposed.html
I marked it as experimental because I think every new thing should go
out as experimental, so that if it turns out to be an albatross, we can
jettison it easily, or modify it for the better. Also, as a result of
our experiences, Unicode has retracted whole sections of their regex
Standard. Apparently, Perl is in the forefront of implementing this UTS
(Unicode Technical Standard. Unicode views UTS's as less set in stone
than the regular Standard. It's a good thing to mark some of these
things as experimental, so that should Unicode revise things, we aren't
left holding the bag. I wish I had done this with their Age property,
whose definition seemed unlikely to be useful, but I didn't have the
confidence back then to question their wisdom, and not knowing what I
have since discovered, that they hadn't actually tried to use some of
the things they specified. Well, they eventually discovered that the
Age property was useless in patterns as defined, and changed what should
happen. But we were left holding the bag. (I had implemented the
Present In property as a Perl extension to DTRT with Age; what Unicode
changed Age to is essentially that, so Perl already had a work-around.)
The link above is to the proposed revisions to TR 18, to show it is
evolving. I am currently working to support some of the more recent
things in it.
>
> *regex strictures* — I believe this should be moved to strict.pm, with
> the shift to "use strict" meaning "use strict VER". Beyond that,
> though, we may want to discuss whether this needs splitting into more
> strictures, especially since it also provides warnings. I feel this may
> be stalled due to lack of engagement from users or porters. #18755
> <https://github.com/Perl/perl5/issues/18755>
>
I wrote this because the regex syntax was designed for concision without
regard to error proneness. It catches questionable things, like lint or
Perl Critic, but usually things you really shouldn't have done. I made
it experimental so that I could add things to it without being
constrained by what was then in the field. Over several releases, I did
add new things, but haven't found new issues for the past several releases.
Thread Previous
|
Thread Next