Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl Monk, Perl Meditation
 
PerlMonks  

Re: why does push not default to $_?

by JavaFan (Canon)
on Dec 06, 2008 at 02:13 UTC ( [id://728462]=note: print w/replies, xml ) Need Help??


in reply to why does push not default to $_?

I meditated but couldn't find a special reason, do you know any?
Simple, because noone found it interesting enough to actually sit down and write a patch. That's how perl5 development works. New features don't get added if enough people want them. New features get added if one person wants it badly enough to write a patch.

So, if you want push to accept a default second argument, write a patch and submit it. I'm not in charge, so I won't have a final say whether it will get in, but if you have the patch, you'll have a pretty good chance. Without the patch and just the wish, chances are almost non-existant.

Replies are listed 'Best First'.
Re^2: why does push not default to $_?
by LanX (Saint) on Dec 06, 2008 at 02:22 UTC
    I never said I want that push accepts a default second argument, I just want a consistent and orthogonal behaviour.

    It may be the occupational disease of a mathematician, but I just prefer a predictabel symmetry in logical systems!

    Cheers Rolf

      I never said I want that push accepts a default second argument, I just want a consistent and orthogonal behaviour.
      Then Perl isn't your forte. Perl was designed with the human mind and natural languages in mind - neither of which are consistent or orthogonal. (BTW, my 'you' was a generic you, not specifically aimed at you).
      It may be the occupational disease of a mathematician, but I just prefer a predictabel symmetry in logical systems!
      Guido van Rossum is a mathematician as well. Hence Python. (This isn't meant as a jab at Python - far from it; Python is a nice language, it just has a different philosophy than Perl).
        > Then Perl isn't your forte. Perl was designed with the human mind and natural languages in mind - neither of which are consistent or orthogonal.

        sorry thats a cheap argument. A natural language is not neccesarily inconsistent. Maybe you think this because your an English speaker, but I know plenty of languages which are far more consistent and orthogonal than English.

        And if you read the whole thread, you will see that the behaviour of push depends on the prototype interface, which is surely not modelled after a human language!

        Cheers Rolf

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://728462]
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: (5)
As of 2024-04-19 03:10 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found