Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl-Sensitive Sunglasses
 
PerlMonks  

Re^3: Why doesn't Perl provide %_ as the hash equivalent of @_ in subs?

by smls (Friar)
on Sep 26, 2013 at 11:29 UTC ( #1055820=note: print w/ replies, xml ) Need Help??


in reply to Re^2: Why doesn't Perl provide %_ as the hash equivalent of @_ in subs?
in thread Why doesn't Perl provide %_ as the hash equivalent of @_ in subs?

"and you can createonenow with Devel::Declare"

More or less all conceivable language features can probably be implemented using Devel::* modules, but that's no argument against wanting something to be a built-in Perl feature - so it can be conveniently used even in casual self-contained Perl scripts, and so it will be fast.


Comment on Re^3: Why doesn't Perl provide %_ as the hash equivalent of @_ in subs?
Re^4: Why doesn't Perl provide %_ as the hash equivalent of @_ in subs?
by Anonymous Monk on Sep 26, 2013 at 12:42 UTC

    but that's no argument against wanting something to be a built-in Perl feature - so it can be conveniently used even in casual self-contained Perl scripts, and so it will be fast.

    yes it is because of exactly this

    Hap-hazard new features is the reason perl has so many warts, and the p5p are finally catching onto this

    This is why your feature-dea will never be a built-in Perl feature like you imagine it will be -- nobody is going to implement it for you and ferret out all the bugs and interactions (and XS and ...) :)

    The burden of proof is upon you to prove this feature is worth it, to ferret out all the potential problems and interactions

    At least you're not asking to change precedence table :)

Re^4: Why doesn't Perl provide %_ as the hash equivalent of @_ in subs?
by Tanktalus (Canon) on Oct 04, 2013 at 19:33 UTC

    The idea is interesting. There are some problems that many people have rightly put forth. One to watch out for, however, is that there is often an underlying "I don't like change" to the negativity, and you have to ignore that.

    However, you do have to prove your idea a bit better. And one way to do so is to put together a useable CPAN module that does what you want, and it may need to use a Devel::* module or two. Or ten. Whatever. It gives you a playground to try your idea, get feedback, and show its usefulness. Or lack thereof.

    And then, and only then, if it proves to be good, then you can bring it up to p5p to see if they would want to make it part of the actual language. And if your design takes into consideration all the concerns and shows itself to be generally useful, then maybe they'll like the idea. I've found they're less resistant to change than many of perl's users, though they are much more strict about compatibility than most, including the p5p of 8 or 10 years ago. (They've learned some harsh lessons.)

    I've managed to squeak a few patches into perl. Some new features, some changed implementations, but nothing as big as this. But that has also given me the opportunity to see how these men and women operate, and, in general, I see it to be a pretty forward-looking bunch. Not all new features need to be universally useful. Heck, just look at say - it's handy, but it doesn't offer any earth-shattering benefit over print.

    So, to answer your original question, try implementing it via Devel::*, and maybe that'll give you the answer ("too hard!"), or maybe it'll give you the reason to do it and offer it to p5p.

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others browsing the Monastery: (8)
As of 2014-08-23 04:31 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The best computer themed movie is:











    Results (172 votes), past polls