<br><font size=2 face="sans-serif">Hi,</font>
<br>
<br><font size=2 face="sans-serif">Maybe we should start by thinking again
about the different use-cases of foreach and from there on define what
foreach can and should do including a more formal view on its semantics.</font>
<br>
<br><font size=2 face="sans-serif">I started a Wiki page for it here: </font><a href="http://www.furcas.org/wiki/index.php/Foreach-usecases"><font size=2 face="sans-serif">http://www.furcas.org/wiki/index.php/Foreach-usecases</font></a>
<br>
<br><font size=2 face="sans-serif">Cheers,<br>
Thomas<br>
</font>
<table>
<tr>
<td valign=top><img src=cid:_1_0B82B7200B82B364002B071CC125783B>
<td><font size=3>&nbsp; </font>
<td><font size=1 face="Verdana"><b>Thomas Goldschmidt </b><br>
<br>
ABB AG<br>
Forschungszentrum<br>
Wallstadter Straße 59<br>
68526 Ladenburg<br>
Office Phone: +49 6203 716134<br>
Office Fax: +49 6203 716253<br>
e-mail:</font><font size=1 color=blue face="Verdana"> thomas.goldschmidt@de.abb.com</font></table>
<br>
<br><font size=1 color=#808080 face="Verdana">ABB AG<br>
Sitz/Head Office: Mannheim <br>
Registergericht/Registry Court: Mannheim<br>
Handelsregisternummer/Commercial Register No.: HRB 4664<br>
Geschäftsführung/Managing Board: Peter Smits (Vorsitzender), Joachim Schneider,
Markus Ochsner, Hans-Georg Krabbe<br>
Vorsitzender des Aufsichtsrats/Chairman of Supervisory Board: Bernhard
Jucker<br>
<br>
Diese E-Mail enthält vertrauliche und/oder rechtlich geschützte Informationen.
Wenn Sie nicht der richtige Adressat sind oder diese E-Mail irrtümlich
erhalten haben, informieren Sie bitte sofort den Absender und vernichten
Sie diese Mail. Das unerlaubte Kopieren sowie die unbefugte Weitergabe
dieser Mail ist nicht gestattet. <br>
<br>
This e-mail may contain confidential and/or privileged information. If
you are not the intended recipient (or have received this e-mail in error)
please notify the sender immediately and destroy this e-mail. Any unauthorized
copying, disclosure or distribution of the material in this e-mail is strictly
forbidden.</font>
<br>
<br>
<br>
<table width=100%>
<tr valign=top>
<td width=40%><font size=1 face="sans-serif"><b>&quot;Uhl, Axel&quot; &lt;axel.uhl@sap.com&gt;</b>
</font>
<br><font size=1 face="sans-serif">Sent by: furcas-discussion-bounces@lists.furcas.org</font>
<p><font size=1 face="sans-serif">17.02.2011 17:49</font>
<td width=59%>
<table width=100%>
<tr valign=top>
<td>
<div align=right><font size=1 face="sans-serif">To</font></div>
<td><font size=1 face="sans-serif">furcas-discussion &lt;furcas-discussion@lists.furcas.org&gt;</font>
<tr valign=top>
<td>
<div align=right><font size=1 face="sans-serif">cc</font></div>
<td>
<tr valign=top>
<td>
<div align=right><font size=1 face="sans-serif">Subject</font></div>
<td><font size=1 face="sans-serif">[furcas-discussion] Constraints regarding
&nbsp; &nbsp; &nbsp; &nbsp;ForEachContext.contextElement</font></table>
<br>
<table>
<tr valign=top>
<td>
<td></table>
<br></table>
<br>
<br>
<br><tt><font size=2>Hi,<br>
<br>
looking even closer at the foreach-related code there unfortunately are
more issues. The specification allows for foreach expressions to have a
non-EObject result type, such as String or Boolean. I'm pretty sure this
won't work, and we don't have test cases asserting this functionality which
is bad. The contextElement reference in ForEachContext is typed as EObject.
Therefore it's unable to hold String or Boolean values.<br>
<br>
Another thing to keep in mind is that generally it is possible that a foreach
expression results in a Bag containing several occurrences of equal elements
for each of which an element has been produced. This in particular means
that the corresponding ForEachContext elements have equal contextElement
contents. What should our constraints be w.r.t. ordered features?<br>
<br>
Imagine the following situation: a foreach expression may produce [e1,
e2, e1] for which elements [f1, f2, f3] are produced. When something changes
such that the foreach expression only produces [e1, e2] then intuitively
speaking we may expect the feature to be updated to [f1, f2] and not [f2,
f3}. See what I mean?<br>
<br>
I think we should approach a more formal specification of features such
as &quot;foreach&quot; because otherwise we'll end up in a big mess.<br>
<br>
Opinions on how such a specification for the foreach-feature should look
like?<br>
<br>
Best,<br>
-- Axel<br>
_______________________________________________<br>
Furcas-discussion mailing list<br>
Furcas-discussion@lists.furcas.org<br>
</font></tt><a href="http://lists.furcas.org/cgi-bin/mailman/listinfo/furcas-discussion"><tt><font size=2>http://lists.furcas.org/cgi-bin/mailman/listinfo/furcas-discussion<br>
</font></tt></a>
<br>