Re: more closed-world chatter

From: Marshall <marshall.spight_at_gmail.com>
Date: 10 May 2007 21:27:14 -0700
Message-ID: <1178857634.430735.191530_at_p77g2000hsh.googlegroups.com>


On May 10, 8:10 pm, Bob Badour <bbad..._at_pei.sympatico.ca> wrote:
> Marshall wrote:
>
> I see a major problem with what you desire. Suppose neither t1 is a
> supertype of t2 nor t2 is a supertype of t1. Suppose further that t1
> intersect t2 is not empty.
>
> No single data type might describe the intersection of t1 and t2. One
> might have to describe the intersection as the union of a set of data types.
>
> Where does that leave your least specific subtype?

Yes, that's a real issue. And I'm not aware of any programming language
that works the way I describe. But the situation seems closely related to the issue of structural vs nominal types. Most (statically typed) languages use nominal type systems, but nominal isn't expressive enough for something like join, where the result type might not have been declared or named ahead of time.

And yet set theory seems ideally suited to handle this.

Now, one thing I'm not clear on is whether this can be implemented efficiently. It might be a real problem. But it's one I'm interested in pursuing.

Marshall Received on Fri May 11 2007 - 06:27:14 CEST

Original text of this message