[m-rev.] for review: disallow impure parallel conjuncts
Julien Fischer
juliensf at csse.unimelb.edu.au
Wed Aug 16 17:40:30 AEST 2006
On Tue, 15 Aug 2006, Peter Wang wrote:
> Estimated hours taken: 1.5
> Branches: main
>
> Disallow impure parallel conjuncts as they can introduce concurrency issues.
> e.g. in the following X could be bound to `foo' or `bar' in different runs.
>
> impure set_mutvar(foo),
> (
> semipure get_mutvar(X)
> &
> impure set_mutvar(bar)
> )
Is that a reason for disallowing them though? Presumably at some point
I'm going to have to promise that is pure - if there are concurrency
issues then either the promise is a lie. I don't necessarily see
why the following should be not allowed:
(
impure foo
&
impure something_unrelated_to_foo
)
If the code is impure then it is up to the programmer to ensure its
correctness.
Julien.
--------------------------------------------------------------------------
mercury-reviews mailing list
Post messages to: mercury-reviews at csse.unimelb.edu.au
Administrative Queries: owner-mercury-reviews at csse.unimelb.edu.au
Subscriptions: mercury-reviews-request at csse.unimelb.edu.au
--------------------------------------------------------------------------
More information about the reviews
mailing list