[Grace-core] Minutes of Teleconference 2011.12.7-8
James Noble
kjx at ecs.vuw.ac.nz
Wed Dec 7 20:07:49 PST 2011
We talked about
* the inheritance question
- we confirmed the rhs of an inherits clause "definitely statically" resolves to an object constructor call or a correct request for a class's new method.
this allows inheritance from objects, or from "class encodings" as well as classes.
- as part of this discussion, we changed the generic class syntax so generic classes created by writing e.g.: Foo.new<T>
this simplifies the "object encoding" of generic classes - as only a generic method is required.
class CatFactory<T> {
aColour : T, aName : String ->
def colour : T := aColour
def name : String := aName
var miceEaten := 0
}
rewrites to
> def CatFactory = object {
> method new<T>(aColour: T, aName: String) -> Cat<T>
> where T <: Colour
> {return object { // the cat herself, now generic
> def colour : T := aColour
> def name : String := aName
> var miceEaten := 0
> }
> }
> }
- (Kim can see the rationale & has gone along with this, but would still prefer a syntax that paralleled types (e.g. new Foo<T> or Foo<T>.new)
* the module system
james is editing a draft email and will send soon. main idea is that modules are reified as objects.
other ongoing things
* James should be fixing the parser combinator-based grammar
* Kim will write type & etc rules
* Michael is working on pattern matching
* Tim is working on a minigrace port to Java
J
next meeting: wed 14 Dec 3pm Pacific, thurs 15 Dec noon NZ
More information about the Grace-core
mailing list