
<union-type>, <limited-type>
I notice there are classes for singletons (and classes, of course), but
not (< http://www.*-*-*.com/ ;) for
union types or limited types. I imagine something like this:
define sealed class <union-type> (<type>)
constant slot first :: <type>, init-keyword: first:;
constant slot second :: <type>, init-keyword: second:;
end class;
define sealed abstract class <limited-type> (<type>)
constant slot base-class :: <class>;
end class;
define sealed class <limited-integer-type> (<limited-type>)
inherited slot base-class, init-value: <integer>;
constant slot min :: <integer>, init-keyword: min:;
constant slot max :: <integer>, init-keyword: max:;
end class;
define sealed class <limited-collection-type> (<limited-type>)
inherited slot base-class, init-keyword: base:;
constant slot of :: <type>, init-keyword: of:;
end class;
Opinions?
--
Ashley Yakeley, Seattle WA