[Grace-core] Minutes of Teleconference 2012.01.10-11

James Noble kjx at ecs.vuw.ac.nz
Tue Jan 10 17:25:45 PST 2012


* james forgot the day! oops.

* talked through Kim's first cut on type system
  - do we need where clauses on type declarations (rather than just classes & methods)

* void - singleton object
* Void - type of void

* Inheritance - syntax confirmed as minutes of "Minutes of Teleconference 2011.12.21-22"

> class CountingStackClass.new<T>(size : Number, bottom : Number) -> CountingStack<T> {
>  inherits StackClass.new<T>(bottom) 
>       // permitted via "definitively static" 
>  var count:= 0;
>  override method push ...
> ...
> 
> Here is the unencoded version:
> object CountingStackClass
>      { method new<T>(size : Number, bottom : Number) -> CountingStack<T>
>            { object { inherits StackClass.new<T>(bottom)
>                 var count := 0
>                 <override> method push { … }
>           } 
>       }

basically we can (almost :-) treat "inherits" as a declaration.
What follows "inherits" must be "definitively statically" bound to an object -
   that objects vars, defs & method declarations are "copied" in, preserving lexical scope
It is guaranteed that a method called "ClassName.new<T>(F)" where type & formal
parameters match a class declaration will be definitively statically bound.


* decided we have a set of default methods (at least , != == and there may be more)  
   implicit in type literals;  
   object constructors & classes inherit from "basicObject" by default that defines these methods


* next meeting:

-------------- next part --------------
A non-text attachment was scrubbed...
Name: iCal-20120110-161548.ics
Type: text/calendar
Size: 764 bytes
Desc: not available
URL: <https://mailhost.cecs.pdx.edu/mailman/private/grace-core/attachments/20120111/5903649d/attachment.ics>
-------------- next part --------------




================================================================
================================================================

Footnote --- if we wanted to get rid of the ".new" in class headers, we could 
"encoded classes as methods" rather than objects, basically like this:

> 
> class CountingStackClass<T>(size : Number, bottom : Number) -> CountingStack<T> {
>  inherits StackClass.new<T>(bottom) 
>       // permitted via "definitively static" 
>  var count:= 0;
>  override method push ...
> ...
> 
> Here is the method encoded version - a class is now just a method around an object constructor

> method CountingStackClass<T>(size : Number, bottom : Number) -> CountingStack<T>
>            { object { inherits StackClass.new<T>(bottom)
>                 var count := 0
>                 <override> method push { … }
>           } 





More information about the Grace-core mailing list