[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Any and Every... (was Re: Eval)



"Peter H. Froehlich" <pfroehli@ics.uci.edu> writes:

> Hi there!
> 
> I think now the terminology gets completely out of hand. :-)
> 
> Let's say my language L has the simple types INTEGER and BOOLEAN as
> well as the compound types (well, type-constructors) ARRAY and
> RECORD. The "set of types in L" is {INTEGER, BOOLEAN, ARRAY, RECORD}
> where ARRAY and RECORD stand for "all declared ARRAY and RECORD types"
> (so there are lots).
> 
> 
> The subset of simple types of L is {INTEGER, BOOLEAN} and the subset
> of compound types of L is {ARRAY, RECORD}. Now why would I *not* be
> able to talk about the intersection of these to subsets being empty?

Well, you could talk about the types themselves, but you probably are
more interested in talking about the *elements* within them.

So let's say my language has simple types `positive-integer',
`negative-integer', and `boolean'.  Sure I could make a set of
some of these types {`positive-integer', `boolean'}, but what of it?
It is a set with two elements.  So is {`positive-integer',
`negative-integer'}.  These sets aren't even representable in my
language!

What is much more interesting is talking about the *elements* of the
types.  `positive-integer' is a set {1, 2, 3, ...} and
`negative-integer' is a set {-1, -2, -3}.  The union of these is {1,
-1, 2, -2, 3, -3, ....} and the intersection is {}.