[m-rev.] For review: State-variable record update transformation
Julien Fischer
juliensf at csse.unimelb.edu.au
Mon Mar 5 14:23:57 AEDT 2007
On Mon, 5 Mar 2007, Peter Schachte wrote:
> Julien Fischer wrote:
>> On Fri, 2 Mar 2007, Peter Schachte wrote:
>>> 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 ':='.
>
> All true, but beside the point. My point is about people's natural expectation
> and intuition. If you can use := to replace part of a term, it seems a pretty
> natural generalisation to use it to replace the whole term, particularly since
> that's how that syntax works in Algol-like languanges.
Those who base their "natural" expectations and intuitions on Algol-like
languages and then try to apply them to Mercury are going to end up
confused about more than just the role of the ':=' operator.
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