<union-type>, <limited-type> 
Author Message
 <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



Tue, 22 May 2001 03:00:00 GMT  
 <union-type>, <limited-type>

Quote:

>I notice there are classes for singletons (and classes, of course), but
>not (<http://www.harlequin.com/products/ads/dylan/doc/drm/drm_90.htm>) for
>union types or limited types. I imagine something like this:

They don't fit into the class hierarchy well, because there can be overlap.
If have union(<T1>, <T2>) and union(<T2>, <T3>), what's the class
precedence list for <T2>?

--

GTE Internetworking, Powered by BBN, Burlington, MA
*** DON'T SEND TECHNICAL QUESTIONS DIRECTLY TO ME, post them to newsgroups.
Don't bother cc'ing followups to me.



Tue, 22 May 2001 03:00:00 GMT  
 <union-type>, <limited-type>

Quote:



> >I notice there are classes for singletons (and classes, of course), but
> >not (<http://www.harlequin.com/products/ads/dylan/doc/drm/drm_90.htm>) for
> >union types or limited types. I imagine something like this:

> They don't fit into the class hierarchy well, because there can be overlap.
> If have union(<T1>, <T2>) and union(<T2>, <T3>), what's the class
> precedence list for <T2>?

The same as it was before. 'Union(<T1>, <T2>)' is a type (i.e. an instance
of <type>, or <union-type>) not a class (instance of <class>).

<union-type> would derive off <type>, not <class>, so I'm not making
union-types classes.

--
Ashley Yakeley, Seattle WA



Tue, 22 May 2001 03:00:00 GMT  
 
 [ 3 post ] 

 Relevant Pages 

1. ><><><><>Heeeeeeeeeeeeeeelp on INT 14!><><><><><>

2. <<<<<YOU MUST CHECK THIS OUT >>>>>>>>>> 2103

3. as(<string>, <type>)

4. <><><> FLOODFILL <><><>

5. >>>HELP, DECOMPILER<<<

6. <<<XXX Password>>>

7. <<<XXX Password>>>

8. <<<XXX Password>>>

9. >>>>>>>>>>>>>>>>>>>HEY!<<<<<<<<<<<<<<<<<<<<<<<

10. ??? <<<<<<<<<<<<<<<<<<<< RGB 4 MMX >>>>>>>>>>>>>>>>>>>>>>>?

11. ??? <<<<<<<<<<<<<<<<<<<< RGB 4 MMX >>>>>>>>>>>>>>>>>>>>>>>?

 

 
Powered by phpBB® Forum Software