singleton type constructor?

P T Withington ptw at
Thu Nov 15 12:27:22 PST 2007

I asked this in a bug comment, but it is more appropriate here.

Dylan has a singleton type constructor so that you can make a type out  
of an instance.  This is an alternate way of expressing the `eql`  
specializers of CLOS generic functions.  Should es4 have a singleton  
type constructor?  Ex:

theoneandonlyfoo = new Foo;

generic function stringify (o: Foo) { return "Any old Foo"; }
generic function stringify (o: singleton(theoneandonlyfoo)) { return  
"The one and only foo"; }

More information about the Es4-discuss mailing list