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

Re: whither study()?

Thread Previous | Thread Next
From:
Ricardo Signes
Date:
January 30, 2012 15:19
Subject:
Re: whither study()?
Message ID:
20120130231929.GB13451@cancer.codesimply.com
* demerphq <demerphq@gmail.com> [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. ;)

-- 
rjbs

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