[m-dev.] for review: improvements for record syntax
Ralph Becket
rbeck at microsoft.com
Tue Dec 12 03:26:21 AEDT 2000
>From schachte at cs.mu.OZ.AU on 10/12/2000 22:50:29
> You didn't think we were going to reach an armistice in the syntax wars,
> did you? ;-)
If only we could disguise these things as semantic issues...
> > How about:
> > X = Map ^ entry(Key)
> > and Map ^ entry(Key) := Y
>
> `entry' is not bad, and I agree it's better than `value'. How about
> `item'? It sounds like about the same meaning to me as `elem', but
> it's not an abbreviation. And it's a letter shorter than `entry'
> and `value'. I'd mark my (preference-based) ballot:
My original thinking was that, since maps are partial functions, a
good name would be `image', as in `Map ^ image(Key)'.
This didn't go down too well, so my next thought was that maps define
relationships between keys and values, hence `Map ^ value(Key)'.
`elem[ent]', `entry' and `item' all fail to suggest the functional
nature of maps to me, although I could probably live with `item' if
I had to.
One possibility is to stick with the status quo and have
Map ^ lookup(Key)
Map ^ set(Key) := Value
--
Ralph Becket | MSR Cambridge | rbeck at microsoft.com
--------------------------------------------------------------------------
mercury-developers mailing list
Post messages to: mercury-developers at cs.mu.oz.au
Administrative Queries: owner-mercury-developers at cs.mu.oz.au
Subscriptions: mercury-developers-request at cs.mu.oz.au
--------------------------------------------------------------------------
More information about the developers
mailing list