no tag types
Thomas Charles CONWAY
conway at cs.mu.OZ.AU
Fri Nov 6 15:21:16 AEDT 1998
I've talked with various Mercury people at different stages about
name-equivalence and no-tag types, eg:
:- type foo ---> foo(int).
which, although less convenient than
:- type foo == int.
avoids accidentally mixing foos and ints.
Maybe a useful thing would be to make:
:- type foo = int.
be equivalent to
:- type foo ---> foo(int).
except that it guarantees that foos will have the same runtime
representation as ints.
Expressions like:
X = foo(42)
and
X = foo(W), Z = foo(2 * W)
would mean excatly the same in both cases.
Comments? (Ie I've no idea how hard this would be to implement).
Thomas
--
Thomas Conway <conway at cs.mu.oz.au> )O+
To a killer whale, otters are like hairy popcorn -- Paul Dayton
More information about the developers
mailing list