[m-dev.] syntactic suggar suggestion for state variables

Ben Schmidt b.schmidt at ugrad.unimelb.edu.au
Sun Jan 14 00:06:04 AEDT 2007


I'd put in a vote for it. Very clear what it means, so improves 
readability and writability.

Grins,

Ben.



Jonathan Morgan wrote:
> While on the topic of state variables, another useful improvement
> (which was suggested on mercury-users about six months ago) would be
> to transform
> 
> !Var ^ field := Value
> 
> into
> 
> !:Var = !.Var ^ field := Value
> 
> I observe that a similar transformation is available with DCG notation
> (e.g. ^ field := Value).  As I vastly prefer state variables to DCGs
> for most things, I would like this to be added to state variable
> notation (currently it leads to a DCG field access goal error).
> 
> I would be happy to try to make this change if it were approved in 
> principle.
> 
> Jon
--------------------------------------------------------------------------
mercury-developers mailing list
Post messages to:       mercury-developers at csse.unimelb.edu.au
Administrative Queries: owner-mercury-developers at csse.unimelb.edu.au
Subscriptions:          mercury-developers-request at csse.unimelb.edu.au
--------------------------------------------------------------------------



More information about the developers mailing list