[Grace-core] Type declarations

Andrew P Black black at cs.pdx.edu
Thu Mar 20 18:12:15 PDT 2014


On 19 Mar 2014, at 23:55 , Timothy Jones <tim at ecs.vuw.ac.nz> wrote:

> 'brand.Type' (or whatever we decide to call
> it) is a static type as far as the brand checker is concerned, but it has no
> structural type information encoded in it.

I don't understand this.  If there is no structural type information in a branded type, how can you check that I'm telling the truth when I claim that an object has a branded type?  Presumably, you want to make sure that the interfaces AND the brands match when checking a branded type.

My suggestion for the declaration keyword would be "const" or "manifest", in the sense of compile-time constant, used just like we use def right now.   The right-hand–side of a const or manifest declaration must be compile-time evaluable.  Interfaces are one example of that; your pattern types are another, if I understand correctly.

That said, I LIKE using type to mean set of methods and with their types.  I believe that it's what type OUGHT to mean, in an OO language.  But the "type theorists" don't agree ...

	Andrew




More information about the Grace-core mailing list