I must concur that this argument about your pedantic definition of the word "argument" is neither helpful nor enlightening.

On my first try, I found:

A value or reference passed to a function, procedure, subroutine, command or program, by the caller. For example, in the function definition

square(x) = x * x

x is the formal argument or "parameter", and in the call

y = square(3+4)

3+4 is the actual argument.

Clearly, "3+4" is not a value, it is an expression.

Yes, in the case of Perl 5, things get a little more muddled and one way to conceptualize things in an attempt to unmuddle them is to declare that the invocation of a Perl sub does not take a list of "actual arguments", but instead, a single expression that might result in multiple values and thus the presence of a comma is not really separating (actual) argument (expression)s.

But talking about Perl sub arguments in the standard manner doesn't run into problems in the majority of cases. And even when it does, there are other ways to unmuddle things that don't require throwing out the familiar model and language just because it doesn't quite fit for some cases.

So stop insisting people are wrong just because they choose to use one word in a traditional and widely-understood manner.

I actually believe that Perl's comma operator is just a descendant of the use of comma to separate actual argument (expression)s in function calls. And the list-flattening behavior really isn't enough reason to insist that everybody abandon that way of understanding them and talking about them.

Shell scripts have an analogous situation but my copy of "man bash" deals with that without your pedantic gymnastics:

Unquoted implicit null arguments, resulting from the expansion of parameters that have no values, are removed.

and

yank-nth-arg (M-C-y)
Insert the first argument to the previous command (usually the second word on the previous line) at point.

You see, they don't feel ashamed to occasionally talk about an expression as an "argument" even though, based on their definition, it strictly (pedantically) isn't:

The words that are not variable assignments or redirections are expanded. If any words remain after expansion, the first word is taken to be the name of the command and the remaining words are the arguments.

- tye        


In reply to Re^8: Evaluation Order again. (pedantry) by tye
in thread Evaluation Order again. by BrowserUk

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.