<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
  <meta content="text/html;charset=ISO-8859-1" http-equiv="Content-Type">
</head>
<body bgcolor="#ffffff" text="#000000">
But assuming there are dependencies, why wouldn't the order in source
code also imply order in execution order? <br>
<br>
Mathematically, the two different sequences evaluate to different
values:<br>
<br>
x = y + 1<br>
y = x + 1<br>
<br>
assuming y = 0, x = 1<br>
<br>
you get:<br>
x = 0 + 1 = 1<br>
y = 1 + 1 = 2<br>
<br>
final values for x = 1, y = 2<br>
<br>
Now if the order was reversed:<br>
y = x + 1<br>
x = y + 1<br>
<br>
assuming the same initial values y = 0, x = 1<br>
y = 1 + 1 = 2<br>
x = 2 + 1 = 3<br>
<br>
Notice that the final value for x is different, depending on the order
of the execution. <br>
<br>
So, since the order matters (because there are dependencies between the
2 statements, as if there were no dependencies the order would be
irrelevant), then it makes sense that the execution order also follow
the source code order, as the programmer likely wrote the code thinking
that this order would be preserved. <br>
<br>
So, I ask again, why would the execution order not follow the source
code order, assuming there was some dependency among them?<br>
<br>
Ioan<br>
<br>
<pre class="moz-signature" cols="72">-- 
=================================================================
Ioan Raicu, Ph.D.
NSF/CRA Computing Innovation Fellow
=================================================================
Center for Ultra-scale Computing and Information Security (CUCIS)
Department of Electrical Engineering and Computer Science
Northwestern University
2145 Sheridan Rd, Tech M384 
Evanston, IL 60208-3118
=================================================================
Cel:   1-847-722-0876
Tel:   1-847-491-8163
Email: <a class="moz-txt-link-abbreviated" href="mailto:iraicu@eecs.northwestern.edu">iraicu@eecs.northwestern.edu</a>
Web:   <a class="moz-txt-link-freetext" href="http://www.eecs.northwestern.edu/~iraicu/">http://www.eecs.northwestern.edu/~iraicu/</a>
       <a class="moz-txt-link-freetext" href="https://wiki.cucis.eecs.northwestern.edu/">https://wiki.cucis.eecs.northwestern.edu/</a>
=================================================================
=================================================================

</pre>
<br>
<br>
Ben Clifford wrote:
<blockquote
 cite="mid:Pine.LNX.4.64.1002182310500.15193@dildano.hawaga.org.uk"
 type="cite">
  <pre wrap="">
  </pre>
  <blockquote type="cite">
    <pre wrap="">But I don't get it, how can the variable b not have a value, if it is consumed
by cat() in a prior statement?
    </pre>
  </blockquote>
  <pre wrap=""><!---->
Its not prior in execution order; its prior in source text, which does not 
imply execution order.

If I write (in maths, not in a program) this system of simultaneous 
equations:

x = y + 1
y = x + 1

then there is no solution giving values for x and y. Whats happening there 
is fairly close to what Mihael's example was (but saying +1 instead of 
cat, and using integers).

  </pre>
  <blockquote type="cite">
    <pre wrap="">I thought Swift followed a write-once read many
paradigm, which was enforced by the single assignment paradigm.
    </pre>
  </blockquote>
  <pre wrap=""><!---->
yes (apart from arrays, which are monotonically assigned so have most of 
the same properties as single assignment variables)

  </pre>
  <blockquote type="cite">
    <pre wrap="">I guess there is a
distinction between files and variables?
    </pre>
  </blockquote>
  <pre wrap=""><!---->
Variables hold "things". Those things can be in-memory values, or they can 
be files. But for this discussion the distinction doesn't matter - the 
file/in-memory value stuff is orthogonal to the data-directed execution.

  </pre>
</blockquote>
<br>
<pre class="moz-signature" cols="72">-- 
=================================================================
Ioan Raicu, Ph.D.
NSF/CRA Computing Innovation Fellow
=================================================================
Center for Ultra-scale Computing and Information Security (CUCIS)
Department of Electrical Engineering and Computer Science
Northwestern University
2145 Sheridan Rd, Tech M384 
Evanston, IL 60208-3118
=================================================================
Cel:   1-847-722-0876
Tel:   1-847-491-8163
Email: <a class="moz-txt-link-abbreviated" href="mailto:iraicu@eecs.northwestern.edu">iraicu@eecs.northwestern.edu</a>
Web:   <a class="moz-txt-link-freetext" href="http://www.eecs.northwestern.edu/~iraicu/">http://www.eecs.northwestern.edu/~iraicu/</a>
       <a class="moz-txt-link-freetext" href="https://wiki.cucis.eecs.northwestern.edu/">https://wiki.cucis.eecs.northwestern.edu/</a>
=================================================================
=================================================================

</pre>
</body>
</html>