Beefy Boxes and Bandwidth Generously Provided by pair Networks
more useful options
 
PerlMonks  

new features in perl5 - who needs it?

by dk (Chaplain)
on Feb 23, 2009 at 10:32 UTC ( [id://745736]=perlquestion: print w/replies, xml ) Need Help??

dk has asked for the wisdom of the Perl Monks concerning the following question:

Hello all,

Not long ago I was bitten by a problem with clash between exported names and method name resolution, which doesn't have a clean fix. Investigation of the problem showed that it could be fixed easily in perl source, and the patch I've concocted would probably even be a good candidate to 5.12. But I went further, and found that if I'll succeed in changing perl SV structure so that objects (as well as packages) will have ability to have methods declared (so called dynamic methods), not only the original problem would be solved elegantly, but also perl would get per-object methods.

I know also that many recent CPAN modules actually do just that, they provide a way to create per-object methods by re-blessing object on the fly to the dynamic package. So I'm unsure, I'd be interested in working on this problem, but I'd hate to end in a situation where the solution is unneeded. Partly because I've got no responses for this proposal on p5p.

So my question is about how new, possibly not-so-cool features in perl5 are needed, - has everyone gone off to perl6? Is trying to add new stuff in perl5 is flogging of a dead horse? I know that perl6 was born exactly because too many people wanted changes, but I can't say that I'm interested in perl6 as much as I am in perl5, especially given the status of the former right now. Possibly I've missed the train by five years, but what would be my options today?

Replies are listed 'Best First'.
Re: new features in perl5 - who needs it?
by JavaFan (Canon) on Feb 23, 2009 at 11:03 UTC
    Partly because I've got no responses for this proposal on p5p.
    Really? Your first post about this subject dates from Feb 13. 6 direct and indirect replies were posted on Feb 14 and 15, trying to figure out how to fit it in with other method/class plans for 5.12. Noone shot it down. For p5p, that counts as a huge success, specially considering it isn't clear how your suggested change changes existing code. You posted a link to a patch four days ago, and now you're getting impatient people didn't instantly embrace and committed your patch? Get real. There are only a few people that will understand the effects of your patch, and those people 1) have a life as well, 2) may actually take some time to form an opinion.

    Considering that (mainly due to the tuits required to actually do significant things is concentrated upon a handfule of people) perl5 progresses slowly -- from 5.8 to 5.10 took 5 years; from 5.10.0 to 5.10.1 is taking 14 months and counting -- you shouldn't expect 5.12 to happen any time soon. Just because your post didn't get a reaction in 4 days doesn't mean anything.

    And remember, 5.12 will happen. Just not this week.

      No no, the first proposal, I agree, the solution to the original problem was well-accepted, which actually motivated me to look deeper. The patches I've sent, I do NOT want them committed, they are not ripe yet.

      I'm not complaining, really. I'm simply confused because I write extremely rarely to p5p, and I don't know what to expect from there. And honestly, I don't know if there are people like me who still want something new from perl5. If yes, I'll be glad knowing that what I'm planning to do is needed. Don't look for hidden messages in my mail, or you'll find them :)

Re: new features in perl5 - who needs it?
by GrandFather (Saint) on Feb 23, 2009 at 10:42 UTC

    Say, have you tried Perl 5.10?


    True laziness is hard work
      You're right, there ARE people developing interesting things, and that's why I'm in doubt. OTOH I don't know what motivation was for the person who did the great job of adding the MRO stuff. I also missed discussions about it, so I don't know if it was a feature generally found useful, or just a lone cowboy effort.
        I don't know if it was a feature generally found useful, or just a lone cowboy effort.

        The reason (as best I know) was that DBIx::Class was using the Class::C3 module, which I wrote the first version of as a sorta-kinda-joke-maybe-not, but Matt Trout (author of DBIx::Class) decide was really useful for keeping his Multiple-Inheritance hierarchy sane. My version was quite slow and basically a naive poor quality port of a Python version until Brandon took it over and promptly re-wrote it faster and eventually in XS. From there (I assume, cause I wasn't heavily involved) he petitioned p5p wrote tests and patches and got them to accept core changes that would make it possible for Perl to support the C3 MRO natively.

        So basically, no it wasn't lone-wolf-hey-this-is-neat-lets-add-it, it was backed by a serious need in a major module that had lots of community support behind it, and it was something that was not easily and cleanly accomplished outside of the core.

        As for the patch you have described, I would say that it is better as a module then a core addition. The reason being is that I can very easily see it causing issues with existing code (DarkPAN as they call it). I know I am guilty of occasionally using an imported function as a method (mostly just abusing Scalar::Util::blessed so that $obj->blessed returns the class it is blessed into) and I am sure many others are too. As for adding methods to a random SV, this is a major language feature and while cool probably breaks the well established package<->class relationship.

        -stvn

        It was basically Brandon Black bitching about how trying to change MRO (method resolution order) in Perl 5 was a pain and could someone do something about it. I recall the reason being that it was a biggest cause of slowdowns in Moose. Nicholas Clark dared him to write a patch, which he did. The rest, as they say, is history.

        So sort of both, really :)

        • another intruder with the mooring in the heart of the Perl

Re: new features in perl5 - who needs it?
by moritz (Cardinal) on Feb 23, 2009 at 10:41 UTC
    I can't comment on this particular feature - it sounds nice, but I don't think I need it right now.
    So my question is about how new, possibly not-so-cool features in perl5 are needed, - has everyone gone off to perl6? Is trying to add new stuff in perl5 is flogging of a dead horse?

    I'm slowly wandering off to Perl 6, but I feel like I'm about the only one, there's still a strong community of Perl 5, and lots of cool stuff gets developed both on CPAN and in core. Perl 5 is not a dead horse (only the ponie is dead...)

Re: new features in perl5 - who needs it?
by girarde (Hermit) on Feb 23, 2009 at 15:35 UTC
    Not everyone has gone to p6: the OpenBSD project only went to 5.10 a couple of months ago, and only in -current. It'll be in the next release.
      I think the OP was referring to those who develop Perl, since Perl6 isn't out yet.
        To be sure. I'm just pointing out a project that is still looking at ongoing development in p5, although it's not their principal focus.

        Their package manager is written in perl, though.

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: perlquestion [id://745736]
Approved by GrandFather
Front-paged by Arunbear
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others having a coffee break in the Monastery: (1)
As of 2024-04-25 01:15 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found