Re: The Foundation of OO (XDb)

From: James <jraustin1_at_hotmail.com>
Date: 13 Jun 2002 22:54:48 -0700
Message-ID: <a6e74506.0206132154.335f5185_at_posting.google.com>


> Look at how Javascript handles objects using prototypes.
> It sounds very similar to what you are proposing.
> www.wdvl.com/Authoring/JavaScript/Tutorial/objects.html
> Search for "Creating Objects".
> Comments on how your system differs from it.

Thanks for the reference.
They talk about creating an object using two methods:

Method1: Direct Instantiation
myPetDog=new Object();
myPetDog.name="Barney"; // Add property
myPetDog.woof=woof; // Add method

Method2: Class Prototype
function petDog(name) {this.name = name;} // Define class myPetDog=new petDog("barney"); // Create instance

This is not related to the change I am proposing. It would be as if the language allowed me to do the following:

dogLikeMineForMyFriend = new myPetDog(); dogLikeMineForMyFriend.weight = 30;

It looks like I want a copy of the original dog, but I don't. I want an instance. Making an instance of a dog does not make sense but consider the example below:

animal = new object();
animal.warmBlooded = true;

human = new animal();
human.maxLifeSpan = 110;

james = new human();
james.LikesOO = true;

XDb can currently do this via GUI or API even from non-oo languages. Planning to implementing user-defined methods in future. Received on Fri Jun 14 2002 - 07:54:48 CEST

Original text of this message