[m-rev.] For review: State-variable record update transformation
Julien Fischer
juliensf at csse.unimelb.edu.au
Fri Mar 2 18:31:29 AEDT 2007
On Fri, 2 Mar 2007, Peter Schachte wrote:
> Jonathan Morgan wrote:
>
>> Enhance the state variable notation to recognise !X ^ field_list := Term as
>> !:X = !.X ^ field_list := Term.
>
> If you can write
>
> !X ^ f1 ^ f2 := Expr
> and
> !X ^ f3 := Expr
>
> it seems a bit inconsistent not to be able to write
>
> !X := Expr
>
I don't think it is inconsistent not being able to write that. The
proposed syntatic sugar is for field updates in combination with
state variables. Field updates are recognised by the presence of the
field accessor, '^', in addition to ':='. There is no field accessor
in your goal above so the sugar doesn't apply and it should just
be a syntax error.
> (as syntactic sugar for !:X = Expr). Perhaps that should be added, too.
I don't think it should be added. For one thing when I see !X I am
expecting that to be exapnded into !.X, !:X in some fashion.
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