[Grace-core] Inconsistent declaration syntax

Andrew P. Black black at cs.pdx.edu
Sat Aug 4 20:30:18 PDT 2012


On 4 Aug 2012, at 4:56, James Noble wrote:

> on the other hand, well there is one other important declaration syntax:
> 
> method foo { bar }   // and various other extensions :-)

Yes, that's different.  But types and values are all objects, and methods are not.

Making class decls like method decls sorta makes sense, because now they define methods as well as objects.

>> def name = T1 & T2
> 
> So I believe we can write both of these (or at least can in theory :-)
> They set up name as referring to the reified type object.
> But presumably unlike type declarations they can't be used as actual types;

Why not?

	Andrew



More information about the Grace-core mailing list