[Grace-core] an old thread on singleton types (Was: Aside from Abstract)

Andrew P Black black at cs.pdx.edu
Mon Jan 6 16:10:44 PST 2014


On 5 Nov 2013, at 23:11 , James Noble <kjx at ecs.vuw.ac.nz> wrote:

> 
> (but not booleans because otherwise it's too easy to confuse a | b vs a || b ...) 
> 
>> Is it sufficient that it just have a match method?
> 
> probably not - the match method's semantics must be sensible. 
> 

I just found this old thread on singleton types.  It implies that the only method that a type object need have is match.  While match is necessary, it does not seem to me to be sufficient; don't type also need a way of asking what methods are in the type, ands what their argument and result types are?   SingletonTypes could delegate this to a mirror on their distinguished object, but more general type would surely implement such methods.

	Andrew




More information about the Grace-core mailing list