Declaring super types
From: David BL <davidbl_at_iinet.net.au>
Date: Sun, 18 Apr 2010 23:57:42 -0700 (PDT)
Message-ID: <9fb3180a-fc53-4930-912f-ddca5152a26e_at_j17g2000yqa.googlegroups.com>
What's the view on whether a nominal type definition can declare itself to be a super type of another type (even of a built-in type)?
Date: Sun, 18 Apr 2010 23:57:42 -0700 (PDT)
Message-ID: <9fb3180a-fc53-4930-912f-ddca5152a26e_at_j17g2000yqa.googlegroups.com>
What's the view on whether a nominal type definition can declare itself to be a super type of another type (even of a built-in type)?
E.g. suppose that INTEGER is a built-in type and we wish to define type RATIONAL parameterised by (n:INTEGER, d:INTEGER) where n,d represent numerator and denominator.
We seem to want to declare
INTEGER(n) isa RATIONAL(n,1)
which is analogous to
CIRCLE(c,r) isa ELLIPSE(c,r,r)
where ELLIPSE is parameterised in (c:POINT, a:NUMBER, b:NUMBER)
Received on Mon Apr 19 2010 - 08:57:42 CEST