Re: domains aren't subtypes, right?

From: Alfredo Novoa <alfredo_at_ncs.es>
Date: 23 May 2003 04:43:14 -0700
Message-ID: <e4330f45.0305230343.b8ca8bd_at_posting.google.com>


"Marshall Spight" <mspight_at_dnai.com> wrote in message news:<DGhza.951082$F1.115813_at_sccrnsc04>...

> Then you could decide what operators/functions
> this new type would "get" (inherit?) from its originating type. For example,
> you might want to compare city values for equality, or for lexical order,
> but you wouldn't meaningfully want to concatenate city values, even
> though city comes from string and string has a concat operator.

Agreed.

> Sometimes I hear this called a "domain" but that word seems heavily
> overloaded.

Type and domain are used as synonyms.

> So what is the relationship of the city type to the string type? It's
> not a subtype.

It is. I don't see any problem. We simply must decide which operators we want to inherit.

For instance we probably don't want to have a focus_distance operator in a circle type.

Regards
  Alfredo Received on Fri May 23 2003 - 13:43:14 CEST

Original text of this message