[Grace-core] Minutes of Teleconference 2012.01.10-11

Andrew P. Black black at cs.pdx.edu
Thu Jan 12 13:37:16 PST 2012


On 12 Jan 2012, at 0:02, James Noble wrote:

>> I could live with moving the superclass clause outside the braces, but would like to see it connected to the brace expression with an operation, because I want to see think about class expressions, not class declarations, so I want class-valued denotations.
> 
> umm, why?
> I don't mean to be snide - what's the example, what's the need

Oh, just those old bugbears, consistency and orthogonality.

There is no reason to have expressions.  We coudl require that the result of every method request is bound to an identifier, and then that identifier be reused.
Even Java doesnt go taht far, or course; it doesn't make you say

	int value0 = 3 + 5
	int value1 = value0 * 4

etc, but it does do something almost as bad by not having first class lambdas.

My reason is that if we want a syntax for creating class objects without nesting, then we should be able to use it anywhere such an object is wanted, and NOT just in ons special declarative form.   It's not necessary for classes to be expressions, because one can always declare a new name for the class and use that name, as with value0 above.  It just seems silly to require that.

It just struck me that since we now seem to need the new in a class expression (because of generics), we could make a virtue out of necessity and remove the restriction that the factory method is always called new.  Maybe it should be called empty, unique ...   So now, neither of the "new"s in Kim' example is redundant.

	Andrew





More information about the Grace-core mailing list