On Tue, Nov 29, 2011 at 08:54:46AM -0500, Ricardo Signes wrote:
> What if we really want to remove ++, though, for good?
>
> First, `feature->import('inc_operator')` would become fatal. "This feature is
> no longer supported as of 5.28.0"
>
> We could remove it from the default group. Now code without a version
> declaration but with ++ would fail to compile.
>
> What about the per-version groups? We could remove it from those, too, and the
> same thing would happen. This would mean that saying `use 5.14.0` means "give
> me the most 5.14.0-ish behavior you can, and it's okay if after 14 years parts
> of that change."
Would it warn? Would it die?
I can see what might be a problem here. Not sure how hypothetical it is.
We run with this plan. I hope I have the syntax right here:
The deal is that
* `use v5.18;` gets you the complete set of `use feature :v5.18;`
* but we may deprecate and then remove particular features long in the future
particularly the experimental ones
So, when I write the code, I know I'm only using three particular features
from the set that ":v5.18" offers. If I simply use v5.18; there's a risk in
future that my code will get warnings (if not fatal errors) of "I'm sorry,
we can't do v5.18; any more".
So I write my code more defensively (and arguably maintainability). I only
import the features I need. `use feature qw(foo bar baz);`
All is good. I won't get errors when experimental features "clunk" and "sock",
also part of ":v5.18" are removed. My code keeps working.
However, I'm now using an explicit list of "things that I want". Which means
the "make it work by retroactively adding status quo features to the list"
idea doesn't work for me. The feature "inc_operator" wasn't *in* the :v5.18
list when I enumerated the bits I wanted.
So I'm not quite sure how we deal with this.
It kind of seems to want a terse, natural and easily-used way to write
"I'd like the v5.18 status quo plus foo, bar and baz"
Or is Jesse's original "if you don't say anything, you get current 5.14.0
with no features" what saves me here?
Because my code didn't say anything about version, just features it wanted.
Which means that my implicit default is "status quo", and so I automatically
get retrofitted-features enabled to preserve the status quo[1].
Nicholas Clark
1 I keep thinking about preserving *the* Status Quo. Which is starting to look
more urgent, as it seems that 60% already are eligible for their bus
passes. [2]
2 http://www.urbandictionary.com/define.php?term=twirly&defid=1458580
[and I wasn't aware that that was scouse. I believe that London bus
drivers use it too]
Thread Previous
|
Thread Next