Beefy Boxes and Bandwidth Generously Provided by pair Networks
Do you know where your variables are?

Re^2: Sometimes I'd Rather Punch Myself in the Head

by chromatic (Archbishop)
on Dec 20, 2008 at 19:26 UTC ( #731792=note: print w/replies, xml ) Need Help??

in reply to Re: Sometimes I'd Rather Punch Myself in the Head
in thread Five Features Perl 5 Needs Now

This is one reason writing code to support a feature is often more useful than writing a wishlist; code is less ambiguous than English.

I still do think that feature is the wrong approach. I'd rather see the burden of forwards compatibility placed on upgraders. What if we had a module which removed the new features added by default? If you're upgrading a large codebase, you can write use feature limit => 5.006; or something, rather than forcing all potential future code to enable new features explicitly.

Replies are listed 'Best First'.
Re^3: Sometimes I'd Rather Punch Myself in the Head
by xdg (Monsignor) on Dec 21, 2008 at 16:57 UTC

    I don't like "feature" so much myself, but I can live with it as long as use 5.010 also does use feature ':5.010'. I think it's helpful if code is explicit about the version it expects because then it also fails somewhat gracefully if attempted on older Perls.

    Of course, what's I'd also like is this, eventually:

    use 5.012; # strict on, warnings on, features up to 5.12 on


    Code written by xdg and posted on PerlMonks is public domain. It is provided as is with no warranties, express or implied, of any kind. Posted code may not have been tested. Use of posted code is at your own risk.

      I could get used to that idea as well. I don't like the idea of multiplying even more entities to get nice features that should be the default -- having to add use feature 'class'; to every lexical scope containing one or more class keywords along with use strict; and use warnings; gives up some of the gains of adding the keyword!

      If the only pragma I had to use were use 5.012;, that's an improvement.

Re^3: Sometimes I'd Rather Punch Myself in the Head
by BrowserUk (Pope) on Dec 20, 2008 at 20:24 UTC
    I'd rather see the burden of forwards compatibility placed on upgraders.

    ++If only...

    This pseudo-ideal of perpetual backward compatibility is a chain around the neck of software development.

    Imagine if new cars still had drum brakes & leaf springs; 4-speeds & no synchromesh; manual windows, AM radios & 8-track stereos; cast iron blocks, carburators & distributors with rotor arms.

    Examine what is said, not who speaks -- Silence betokens consent -- Love the truth but pardon error.
    "Science is about questioning the status quo. Questioning authority".
    In the absence of evidence, opinion is indistinguishable from prejudice.
      They do, power costs extra

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://731792]
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others chilling in the Monastery: (8)
As of 2019-01-22 20:31 GMT
Find Nodes?
    Voting Booth?
    After Perl5, I'm mostly interested in:

    Results (390 votes). Check out past polls.