in reply to Re^4: why does push not default to $_?
in thread why does push not default to $_?

Even fairly regular natural languages (Latin, for instance) tend to have large numbers of irregularities, tending to cluster around the most commonly used words/concepts.

English is, of course, a particularly non-standardized language, but it is, as the poster suggests, modeled after English. Specifically, the "default to '$_'/'@_'" functionality is modeled after default pronouns in English, and is certainly a key concern of this thread.

The "then perl isn't your forte" was kind of a cheap shot, though.

I'm not sure how non-orthogonal it is for a built-in to choose not to default to $_, especially given that most of the built-ins that do default are unary, to my knowledge.

for(split(" ","tsuJ rehtonA lreP rekcaH")){print reverse . " "}print "\b.\n";

Replies are listed 'Best First'.
Re^6: why does push not default to $_?
by LanX (Saint) on Dec 07, 2008 at 02:58 UTC
    Specifically, the "default to '$_'/'@_'" functionality is modeled after default pronouns in English, and is certainly a key concern of this thread.

    sorry, maybe it's trivial, but what is the default pronoun in English?

    Cheers Rolf

      "Print, photocopy, and fax it" where the first two verbs are referring to "it". Not really sure if this works as a good example, though.

      I'm so adjective, I verb nouns!

      chomp; # nom nom nom

        No, the subject of those three verbs is an unstated "you". "It" is the direct object. But the pronoun wasn't optional. Imperative verbs can't have a explicit subject.

      It's not trivial, don't worry...

      There's no specific "Default pronoun" in English, per se -- it's more that, in certain circumstances, one of several English pronouns can be defaulted to (assumed). The most common of these is probably the implied "you" that imperative statements have, but there are other circumstances (None of which I can compose off the top of my head, because I'm sleep deprived. I'll try to think up some later.)

      for(split(" ","tsuJ rehtonA lreP rekcaH")){print reverse . " "}print "\b.\n";