develooper Front page | perl.perl5.porters | Postings from January 2012

Re: whither study()?

Thread Previous | Thread Next
Ricardo Signes
January 30, 2012 15:19
Re: whither study()?
Message ID:
* demerphq <> [2012-01-29T04:41:33]
> 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?

A few years ago, I casually proposed deprecating it.  This was on IRC or at a
conference or something.  A few people objected that it was actually useful, at
least sometimes, so I know it's being used.

Is it being used to any effect, in most cases?  Is it introducing problems?
Are the breakages that it introduces the only thing keeping code working, now?
Hoo boy!

If it really is as broken as you say -- and I have no reason (or desire!) to
doubt you -- then it does seem worth doing something about.

Do we really want to deprecate it?  Some day, maybe we will want to add this
feature back, and someone will have the energy to write a useful implementation
and test suite.  Unlike many features, where there's some design gain to be
made by ditching it, study isn't a wart.  It's just a once implemented and now
pretty busted thing that might be useful again someday.

The promise of study is that everything will work the same, with some shift in
where cost is.  What if study became a nop?

We could issue a "useless use of study" but do we really need a warning?  The
change would be "fixed a bug where study caused regex matches to behave
incorrectly," and the performance hit would be like any other disabled bad
optimization.  What do we know about how much real effect this would be likely
to have?

> Does anybody have any examples where it actually makes a difference?

I second that question, but I only care if the difference is the kind of thing
we want to keep around. ;)


Thread Previous | Thread Next Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at | Group listing | About