"be consistent" | |
PerlMonks |
Re^8: Evaluation Order again. (pedantry)by tye (Sage) |
on Jun 02, 2016 at 06:36 UTC ( [id://1164732]=note: print w/replies, xml ) | Need Help?? |
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:
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 Section
Meditations
|
|