[Grace-core] Minutes of Teleconference 2012.01.10-11

Andrew P. Black black at cs.pdx.edu
Fri Jan 13 14:04:52 PST 2012


On 13 Jan 2012, at 1:10, James Noble wrote:

> what happens if you execute a class constructor multiple times. 

You get multiple classes, of course.   What else could it possibly mean?   (Consistency and orthogonality again.)

Of course, since our class construct is just a shorthand for an object that has no instance variables, those multiple classes would be egal.  The objects that they manufacture  would have the same type, because of structural typing.   So I don't see that this is harmful in any way.

> If we write "def Foo = class { }" we are making classes even closer to object constructors --- 

I would say that we are making class constructors parallel to object constructors, and also to blocks, which are "function constructors".   Similar syntax, similar semantics.

You convinced me that with types declaraions, there is a reason to use a different syntax — we want types to be manifest.   But I don't know of any such reason for classes.

	Andrew



More information about the Grace-core mailing list