[Grace-core] Semantics of object/classes

James Noble kjx at ecs.vuw.ac.nz
Thu Aug 9 04:45:35 PDT 2012


We're probably heartily sick of this, but I had another attempt...

On 9/08/2012, at 02:56 AM, Andrew P. Black wrote:

> The problem that I see with both your description and Kim's is that they are both written interns of code mangling. James writes, for example, that the declarations of the superclass are added to the object being constructed.  I don't want to talk to my students about code: I want total to them about objects.   That was a large part of the motivation, for me, in doing away with classes as chunks of code, and instead making them objects with a method that creates an (instance) object.
> 
> So in James' and Kim's formulations, 'Car.new' in the clause 'inherits Car.new' doesn't mean the object that car.new means everywhere else in the program: it means the chunk of code that defines car.new.   


Try https://projects.cecs.pdx.edu:8443/~black/NewOOL/index.cgi/wiki/BackwardsFactoryInheritance
edited from my forwards version of yesterday.

the money quote is: 

> The short story is very simple: first 'Car.new' makes a new Car object; then the 'bicycle' object constructor inheriting from 'Car.new' builds on the new car object, turning it into a bicycle.

J


More information about the Grace-core mailing list