Front page | perl.perl5.porters |
Postings from January 2012
Re: whither study()?
January 30, 2012 00:34
Re: whither study()?
Message ID: CANgJU+W-rYWVyCMvPjH5PY1C__3cAPPWZzdoJ-i3ZNpdwxBUFQ@mail.gmail.com
On 29 January 2012 21:03, Paul Johnson <email@example.com> wrote:
> On Sun, Jan 29, 2012 at 10:41:33AM +0100, demerphq wrote:
>> study() breaks stuff. It is currently subtly broken. It has been
>> broken for a long time. It is poorly tested. And ive never actually
>> seen it used in the wild.
>> Is it really in Perls interest that I, or anyone else with the chops,
>> even looks at fixing the bugs related to it? Can we just no-op and
>> deprecate it?
>> So, do we really want to maintain this thing? Does anybody know how it
>> works? Does anybody have any examples where it actually makes a
> See http://www.nntp.perl.org/group/perl.perl5.porters/2011/05/msg171803.html
> for an answer to this particular question.
>> I am going to look a /bit/ further into this just to see if it is a
>> quick fix waiting to happen, but i really do wonder if we should even
>> be maintaining this thing.
> It sounds like we're not properly maintaining it at the moment. Perhaps
> we should officially admit that? But then, I don't think I've ever used
> study() in anger in the last 20 years or so anyway.
And that is my point. Nor have I. I dont think I have even seen it
used. And I bet that people that use it are actually encountering bugs
in it without knowing. So is it really better to have broken but
faster functionality in core that is not maintained?
Yesterday I spent a couple of hours poking it with a stick. The regex
engine is big and gnarly. Lots of special cases and etc. So i wasted a
couple of hours fixing something almost nobody uses. I could have been
working on performance improvements, or whatnot.
Also I suspect that given study()s weaknesses (not working on
unicode), the fact it is currently buggy, and the fact that it
complicates the regex engine, and potentially wastes development time
that could go to more general speedups, I return to my question: is
maintaining this really in the best interests of Perl?
perl -Mre=debug -e "/just|another|perl|hacker/"