[Aldor-l] [Aldor-combinat-devel] extracting the grammar from a species and isomorphismtypegeneratingfunction
Ralf Hemmecke
ralf at hemmecke.de
Fri Oct 20 09:12:54 EDT 2006
Hmm, although I said similar things before, I am somehow sure that
section 7.3 does not apply. We are talking about the part that comes
behind the "add". If you consider that separately then we have
add { expr1; expr2; ... exprk }
The stuff in braces is a 'sequence' (separated by ; not by ,) so the
evaluation order is as written. I don't think that the code behind "add"
appears in a 'type context'.
So, that should fix the order, no?
The compile still can do some tricks since some expressions are known to
have no side effects (there are immutable datatypes like Cross).
So I think Martin's suggestion to move the destructive function calls at
the end of the "add" expression, should work also in other
implementation of an Aldor compiler.
More opinions on that (especially from the Aldor developers) are welcome.
Ralf
On 10/20/2006 11:28 AM, Christian Aistleitner wrote:
> Hello,
>
>> Is the order of
>> evaluation during domain instantiation [...] documented?
>
> Yes -- at least partly. For expressions in type context (e.g: your
> evaluate(...) add), you can refer to §7.3 AUG part “Type evaluation”.
> They basically tell us not to rely on anything.
>
> --
> Kind regards,
> Christian
More information about the Aldor-l
mailing list