<html><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><div><font class="Apple-style-span" face="Times">Ben:</font></div><div><font class="Apple-style-span" face="Times"><br></font></div><div><font class="Apple-style-span" face="Times">The example I saw in the code had the input array (e.g., "a", in "foreach v in a") constructed elsewhere in the program, with a[0] = v1, a[1] = v2. That seemed particularly challenging.</font></div><div><font class="Apple-style-span" face="Times"><br></font></div><div><font class="Apple-style-span" face="Times">Ian.</font></div><div><br></div><br><div><div>On Mar 2, 2009, at 1:40 AM, Ben Clifford wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite"><div><br>On Sun, 1 Mar 2009, Ian Foster wrote:<br><br><blockquote type="cite">2) Arrays: I gather from below that the size of an array is defined by<br></blockquote><blockquote type="cite">assignments to it. This seems confusing and dangerous to me: doesn't it<br></blockquote><blockquote type="cite">require a global analysis, which must ultimately be undecidable, to determine<br></blockquote><blockquote type="cite">whether an array is closed?<br></blockquote><br>yes.<br><br>They're a very unpleasant structure at the moment. As I've written in <br>other mails in more depth, I'd prefer to see them behave as <br>single-assignment structures constructued by something like looks similar <br>to but slightly different to the present loop constructs, so that you'd <br>say:<br><br> array = foreach ....<br><br>rather than<br><br> foreach ... {<br> array[i]=...<br> }<br><br>There would be no requirement for this to actually execute as some atomic <br>operation, and could happen over time interleaved with other tasks, as <br>happens for foreach at the moment; but from a code analysis perspective, <br>its much clearer when the array is closed - after the single statement <br>that assigns to it has fully completed, like non-array variables.<br><br>-- <br>_______________________________________________<br>Swift-devel mailing list<br><a href="mailto:Swift-devel@ci.uchicago.edu">Swift-devel@ci.uchicago.edu</a><br>http://mail.ci.uchicago.edu/mailman/listinfo/swift-devel<br></div></blockquote></div><br></body></html>