[mercury-users] Records

Robert Ernst Johann JESCHOFNIK rejj at cat.cs.mu.OZ.AU
Wed Nov 3 10:20:14 AEDT 1999


On Wed, 3 Nov 1999, Fergus Henderson wrote:

> It seems to me that for a reader the name is of primary importance,
> rather than the type, and so I think the name should come first.

Fair enough.
How about using "is", then?
:- type t --->
	t(
	    name  is string,
	    value is int
	).

I know I'm fighting an uphill battle here, but I just like exploring the
possibilites, that's all. :)

> Probably we won't be using `::' in record type definitions.
> See my other mail.
> 
> Using `:', i.e. `Field1 = X:field1', would conflict with the
> use of `:' as type qualifier.

Dang.
It is just that `^' irks me.. I instantly associate it with things like
bitwise operations, pointers in Pascal, etc. I just get the feeling that
it is rather `ugly' syntax;

	Field1 = X ^ field1,

doesn't look all that nice, and doesn't look like `field1' is a member of
`X', now that I look at it again, the first thing I thought of was "X to
the power of field1".

	Field1 = X!field1,
or
	Field1 = X#field1

perhaps?

I'm sure I'd get used to `^' anyway. I think the problem is that there are
not enough punctuation marks on the keyboard. :)


Rob
--------------------------------------------------------------------------
mercury-users mailing list
post:  mercury-users at cs.mu.oz.au
administrative address: owner-mercury-users at cs.mu.oz.au
unsubscribe: Address: mercury-users-request at cs.mu.oz.au Message: unsubscribe
subscribe:   Address: mercury-users-request at cs.mu.oz.au Message: subscribe
--------------------------------------------------------------------------



More information about the users mailing list