in reply to What is the + in +shift doing here?

Saving a keystroke vis a vis the more clear shift(). Some people are alarmingly parentheses-averse.

Caution: Contents may have been coded under pressure.

Replies are listed 'Best First'.
Re^2: What is the + in +shift doing here?
by Anonymous Monk on Feb 24, 2005 at 10:58 UTC
    And shift() saves two keystrokes vis a vis to the more clear shift(@_). Some people are alarmingly implicite variable-averse.

    Luckily, many people that are parenthesis-averse, or implicite variable-averse program in a language more suitable for them.

      There's nothing "more clear" about shift(@_). We're talking about disambiguating something; to make it clear that it's a function call, parentheses make the most sense. There is nothing ambiguous about leaving the argument implicit, and there's certainly nothing alarming about using implicit variables, just as there's nothing alarming about omitting the parentheses. But using a + instead of the parentheses is economy at the expense of clarity, which is alarming.

      The coward posts anonymously, then logs in to downvote the response.
        to make it clear that it's a function call, parentheses make the most sense.
        Really? That's something uniformly agreed on? People write +shift for the purpose of being unclear?

        I disagree. I couldn't care less whether you find parentheses or unary minus more or less clear, or what makes the most sense to you. But you will find me disagreeing with you each and every time you make such statements as if they are undeniable universal truths.

        But using a + instead of the parentheses
        It's not instead of parentheses. It's instead of using an argument. Or using it in a longer expression. Or instead of parenthesis around the function call. It's just one of many ways to make it not like a bareword.