<div dir="ltr">Hi Benito,<div><br></div><div>Yes, that's true. The semantics for scripting is different even though the same symbol is used. This is mostly the reason why I distinguish between binding and assignment for pedagogical purposes, although I do agree with Mike's point that in the end understanding the semantics of a language matters more than the terminology used.</div><div><br></div><div>In some scripting extensions, Zorba's for example, assignments are statements, and mean that there is a change of snapshot following a side effect (actually changing the value of a variable), and this side effect is subsequently visible everywhere else in the program (for example through a global variable).</div><div><br></div><div>This is different from a binding, in that binding a value to a variable merely organizes dynamic contexts in various scopes in which other expressions are evaluated.</div><div><br></div><div>I visualize the difference like so: side effects due to assignments propagate linearly, left-to-right, in time, whereas variable bindings propagate top-down in an arborescent manner, in a functional way.<br><div><br></div><div>Kind regards,</div><div>Ghislain</div><div><br></div></div></div><br><div class="gmail_quote"><div dir="ltr">On Mon, Nov 21, 2016 at 10:12 PM Benito van der Zander <<a href="mailto:benito@benibela.de">benito@benibela.de</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
  
    
  
  <div bgcolor="#FFFFFF" text="#000000" class="gmail_msg">
    <div id="m_-7740492405672701820smartTemplate4-template" class="gmail_msg">Hi,</div></div><div bgcolor="#FFFFFF" text="#000000" class="gmail_msg"><div id="m_-7740492405672701820smartTemplate4-template" class="gmail_msg"><br class="gmail_msg">
      <br class="gmail_msg">
      <p class="gmail_msg">
        <blockquote type="cite" class="gmail_msg">
          <pre class="gmail_msg">  You may find some resources that somewhat misleadingly define ":="
as the "assignment operator," a phrase that is not found in any XQuery
or XPath specification. Calling ":=" the "assignment operator" is
incorrect in two respects. First, ":=" is involved in the *binding*,
not *assigning*, of values to variables—an important distinction in
functional and declarative languages like XQuery, in which a variable,
once bound to a value, cannot be altered, or reassigned a different
value. Second, the ":=" cannot be described as an *operator* because
it does not produce an output sequence of items, in contrast to
operators like "+" (an arithmetic operator), "and" (a boolean
operator), and "/" (an operator for connecting steps in a path
expression).</pre>
        </blockquote>
      </p>
      <p class="gmail_msg"><br class="gmail_msg">
      </p>
      </div></div><div bgcolor="#FFFFFF" text="#000000" class="gmail_msg"><div id="m_-7740492405672701820smartTemplate4-template" class="gmail_msg"><p class="gmail_msg">although some implementations have a scripting extensions,
        where there actually is an assignment operator, which does both
        these things.<br class="gmail_msg">
         </p>
      <br class="gmail_msg">
      <br class="gmail_msg">
      Cheers,<br class="gmail_msg">
      Benito </div></div><div bgcolor="#FFFFFF" text="#000000" class="gmail_msg">
    <br class="gmail_msg">
    <p class="gmail_msg"><br class="gmail_msg">
    </p>
    <br class="gmail_msg">
    <div class="m_-7740492405672701820moz-cite-prefix gmail_msg">On 11/21/2016 06:40 PM, Joe Wicentowski
      wrote:<br class="gmail_msg">
    </div>
    </div><div bgcolor="#FFFFFF" text="#000000" class="gmail_msg"><blockquote type="cite" class="gmail_msg">
      <pre class="gmail_msg">Hi Ghislain,

Thanks very much for your reply!  If ":=" is not an "operator," by
your helpful definition, then is there a category like "symbol,"
"delimiter," or at worst, "thingy," that it *does* rightly belong to?
I'm looking to fill in the blank in the following sentence, which
builds on your summary:

  ":=" has no formal name in the XPath and XQuery specifications but
is used extensively in clauses and declarations that bind variables.
Specifically, it is used in let and group-by clauses (which produce
tuples) as well as variable and context item declarations (which
contribute to the dynamic context). Rather than leaving this important
symbol nameless, let's call it the "binding ____."

I'm also thinking of a parenthetical note or footnote like this:

  You may find some resources that somewhat misleadingly define ":="
as the "assignment operator," a phrase that is not found in any XQuery
or XPath specification. Calling ":=" the "assignment operator" is
incorrect in two respects. First, ":=" is involved in the *binding*,
not *assigning*, of values to variables—an important distinction in
functional and declarative languages like XQuery, in which a variable,
once bound to a value, cannot be altered, or reassigned a different
value. Second, the ":=" cannot be described as an *operator* because
it does not produce an output sequence of items, in contrast to
operators like "+" (an arithmetic operator), "and" (a boolean
operator), and "/" (an operator for connecting steps in a path
expression).

(For some resources that use the term "assignment operator," see via
<a class="m_-7740492405672701820moz-txt-link-freetext gmail_msg" href="https://www.google.com/search?q=%22assignment+operator%22+xquery" target="_blank">https://www.google.com/search?q=%22assignment+operator%22+xquery</a>.)

It's funny, "/" didn't have a name in XPath 1.0, but got one in XPath
3.0 - "path operator."  Perhaps it's time for ":=" to get a name?

Thanks again,
Joe

</pre>
      <blockquote type="cite" class="gmail_msg">
        <pre class="gmail_msg">Syntactically, ":=" is not an operator because it does not produce an output
sequence of items like "+" or "and" or "/". It is part of let and group-by
clauses (which produce tuples) as well as variable and context item
declarations (which contribute to the dynamic context).

>From a pedagogical perspective, I would simply call it a variable binding,
the important part being not to call it "assignment" to make clear that it
is a functional and declarative language.
</pre>
      </blockquote>
      </blockquote></div><div bgcolor="#FFFFFF" text="#000000" class="gmail_msg"><blockquote type="cite" class="gmail_msg"><pre class="gmail_msg">
_______________________________________________
<a class="m_-7740492405672701820moz-txt-link-abbreviated gmail_msg" href="mailto:talk@x-query.com" target="_blank">talk@x-query.com</a>
<a class="m_-7740492405672701820moz-txt-link-freetext gmail_msg" href="http://x-query.com/mailman/listinfo/talk" target="_blank">http://x-query.com/mailman/listinfo/talk</a></pre>
    </blockquote>
    <br class="gmail_msg">
  </div>

</blockquote></div>