Beefy Boxes and Bandwidth Generously Provided by pair Networks
Think about Loose Coupling
 
PerlMonks  

Re^10: Evaluation Order again. (clarity)

by tye (Sage)
on Jun 02, 2016 at 18:01 UTC ( [id://1164799]=note: print w/replies, xml ) Need Help??


in reply to Re^9: Evaluation Order again. (pedantry)
in thread Evaluation Order again.

Writing clear documentation is an exercise in pedantry.

Uh, no. So very much, no. Pedantry is too far along the spectrum to the point that it actual interferes with communication and reduces clarity. Clear documentation is usually helped by some precision in verbiage. Becoming pedantic leads to wasting time splitting hairs, making the documentation harder to follow.

It's silly that so much fuss is being made about this since the point I was making is that proposed statement is still wrong when you fix the wording.

Unfortunately, you are so committed to this particular pedantry that you believe this, but I went over what you wrote several times trying to find the non-pedantic point being obscured by your zeal for proper use of one word and I'm pretty sure it isn't there, else I'd not have responded as I did.

For example, your sub { }->( X1() = X2() || X3() ); response doesn't demonstrate a flaw in the proposed explanation. It is again just laser focused on how "argument" is the wrong word. When (mildly) misusing "argument" (by using the common definition when talking about Perl), the order of evaluation of "arguments" does not apply in sub { }->( X1() = X2() || X3() ); because there is only one 'actual' argument (expression) in that call. Yes, of course, it isn't hard to realize that more than 1 or even 0 values might result as the list of argument values actually passed to the subroutine. It isn't hard to realize so being pedantic about the word choice more hurts than helps understanding.

You aren't demonstrating the incorrectness of the concepts behind the statement. You are still picking the wrong concept to use in your interpretation of the statement simply because the word "argument" was used. You are demonstrating that your pedantry has prevented you from understanding the intended statement.

If you were less pedantic about it, you might have succeeded in communicating (or perhaps even understanding yourself?) that making a statement about evaluation order of (actual) "arguments" should really be a statement about "lists (of expressions separated by commas)" or (less clearly but more precisely) about "the comma operator". But such a statement can be made clearer by bowing to the reality that the comma operator is still strongly conceptually tied to its origin as a way to separate subroutine arguments. So make a statement about lists and/or commas but add something like "including the list of expressions used as the arguments for a call to a subroutine".

I got that point by reading what your wrote... eventually. But, boy, was it a struggle to pierce the pedantry to be able to get that point.

The fact that order of evaluation applies to the list of actual argument expressions in a subroutine invocation is an important one. And it is helpful to explicitly point that out, and not to just imply it by noting that "these aren't subroutine arguments, they are just uses of the same comma operator". As you point it out, you can also point out the sameness, but even doing that pedantically makes it harder to understand.

- tye        

Replies are listed 'Best First'.
Re^11: Evaluation Order again. (clarity)
by ikegami (Patriarch) on Jun 02, 2016 at 19:15 UTC

    Uh, no. So very much, no. Pedantry is too far along the spectrum to the point that it actual interferes with communication and reduces clarity. Clear documentation is usually helped by some precision in verbiage. Becoming pedantic leads to wasting time splitting hairs, making the documentation harder to follow.

    Maybe I misunderstand the term? I mean I pay excessive attention to the clarity of the text.

    Sorry, but I don't think it's fine to say that f(@a, @b) has two arguments. I think this is more than just just a mild misuse.

    The argument list expression is not exceptional. It's evaluated according to the same rules as any other expressions.

      Maybe I misunderstand the term?

      Or maybe I do? I tend to pay more attention to how I see a word used over how the word is documented (based on how academics have observed the word being used and what they can discern about its origin). But let me check at least one such source:

      A pedant is a person who is excessively concerned with formalism, accuracy, and precision, or one who makes an ostentatious and arrogant show of learning.

      So "excessively" is part of that definition. If that is typical of other scholarly definitions, then that means "pedantry" will likely be used to indicate the existence of a problem. But you used "excessive" in your own definition which you consider positive. So maybe I misunderstand that word:

      Exceeding the usual bounds of something; extravagant; immoderate.

      Well, that doesn't convey a requirement of the degree being problematic. Though, the example usage matches my experience of how it is used, that is, being used to indicate a problem:

      "I personally consider putting a wide vibrato on a single 16th triplet note at 160 beats per minute rather excessive, nay even stupid."

      So, let us concentrate on the point rather than the words. The problem with what I called your "pedantry" is a matter of degree more than of kind. Many of the traits that constitute pedantry are indeed useful in clear communication, at least if they are reduced in degree somewhat.

      And, let me be clear that I value your contributions here at PerlMonks and to the wider Perl community. Part of why I am trying to address this topic is that I have some hope of effecting some small betterment of your excellent works.

      Sorry, but I don't think it's fine to say that f(@a, @b) has two arguments.

      And it is fine for you to never say that. And it is fine for you to point out that such a statement is at least potentially unclear, especially if you don't go all pedantic (such as "an ostentatious and arrogant show") about it.

      But it is demonstrated in this thread that your overly strong insistence on that particular stance has interfered not only with your ability to effectively communicate to others, but also interfered with your own ability to understand what is being said, even after significant clarifying discussion.

      So you are free to "take a stand". But you are hurting your ability to communicate in both directions by doing so. And I personally find that loss unfortunate.

      Perhaps it would help you deal with seeing such statements to realize that "f(@a, @b) has two arguments" is just a slightly shortened way of saying "f(@a, @b) has two argument expressions". And that is simply factually true. Granted, those two argument expressions are also part of the single argument expression that is formed by combining those two via a comma. Making a big deal out of the omission of a single qualifying word is not a great communication strategy. Being unable to understand what is pretty clear to many readers because of your insistence is even worse.

      Just because you understand that, lacking any qualifiers, when talking about Perl, "argument" is most accurately used to refer to scalar values, doesn't mean that it is helpful for you to complain if I am talking about Perl and say "the argument you are making is baseless". You probably agree with that. Your insistence on only your approved use of the word "argument" is sometimes not much more useful (and almost as irritating).

      The fact that you know that the comma used to separate expressions when passing arguments to Perl subs is no different than other users of the comma operator, doesn't mean that everybody is always keenly aware of that. And you knowing that Perl parses the "actual argument(s)" as just "a single expression", doesn't mean that thinking in terms of passing several arguments to a Perl sub by separating then with commas is an unacceptable mental model. Heck, it is a perfect model in huge numbers of cases and is the mental model used in tons of languages that are significantly similar to Perl and even in the languages that Perl stole its ideas from.

      I know from experience that it can be quite frustrating when being taught some subject to get taught a model that you soon learn is factually incorrect (in some ways or for some cases). But I've learned over time that effectively teaching requires being open to multiple mental models. Heck, I've fairly often seen how person X just can't seem to learn subject S from person Y because none of the mental models that Y uses to understand S "work" for X. Yet X can learn S easily from person Z.

      Vehemently rejecting a useful and very common but imperfect mental model and its terminology just hinders your communication ability. You (and others) would be much better off if you learned to just fill in some unstated qualifiers so you can get over statements that you interpret as being incorrect. They may well be simply incorrect for how you choose to use the word "argument". But you were not the one choosing.

      - tye        

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://1164799]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others imbibing at the Monastery: (2)
As of 2024-04-25 20:03 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found