Re: Declaring super types
From: Nilone <reaanb_at_gmail.com>
Date: Mon, 19 Apr 2010 05:23:52 -0700 (PDT)
Message-ID: <d1290d4b-7c2e-446c-8d75-0c6a5db2892e_at_e7g2000yqf.googlegroups.com>
Date: Mon, 19 Apr 2010 05:23:52 -0700 (PDT)
Message-ID: <d1290d4b-7c2e-446c-8d75-0c6a5db2892e_at_e7g2000yqf.googlegroups.com>
On Apr 19, 8:57 am, David BL <davi..._at_iinet.net.au> wrote:
> 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)
How would you want to use that relationship? Any examples to study? Received on Mon Apr 19 2010 - 14:23:52 CEST
