Dear Andreas,
> I understand that. And I see it's an improvement, but it is not fully
> conservative. I also understand that we can adapt (and you showed how,
> thanks a lot!). What I don't see, however, is how to adapt in a way
> that will work with the upcoming release *as well as* with the
> previous ones. That was the reason why I said we have to sync the
> Alice release with 1.3.0, or alternatively, seek for assistance. ;-)
>
> So the changes you propose are already helpful for making a sync'ed
> release. But if you could provide good hacks to support
> backward-compatible implementations we would be even more thankful.
My first idea is to let the Oz compiler select the implementation by
using \ifdef macros. The following stuff is not pretty elegant, but it
does the job.
\ifdef Mozart_1_0
\define BEFORE_1_3_0
\else
\ifdef Mozart_1_1
\define BEFORE_1_3_0
\else
\ifdef Mozart_1_2
\define BEFORE_1_3_0
\endif
\endif
\endif
'Future.status':
\ifdef BEFORE_1_3_0
fun {$ X}
if {IsFuture X} then
if {Value.isFailed X} then 'FAILED'
else 'FUTURE'
end
else 'DETERMINED'
end
end
\else
fun {$ X}
case {Value.status X}
of future then 'FUTURE'
[] failed then 'FAILED'
else 'DETERMINED'
end
end
\endif
Cheers,
raph
-
Please send submissions to hackers@mozart-oz.org
and administriva mail to hackers-request@mozart-oz.org.
The Mozart Oz web site is at http://www.mozart-oz.org/.