simple object model (was: [self-interest] selfing Self)
steve at dekorte.com
Fri Mar 30 21:39:49 UTC 2001
On Friday, March 30, 2001, at 11:59 AM, Jecel Assumpcao Jr wrote:
>> now I'm in process of thinking out a more flexible but yet powerful
>> language. By now I have implemented two experimental versions of
>> Self. But I need something different.
> Me too, but more in the spirit of Self than the Self-inspired languages
> of the early 1990s.
>>> Like a simple object model: objects are just flat association lists
>>> (I'll use Lisp notation below) -
>>> (x 3 y 4)
>> flat list has an array structure rather than linked list?
tables for "objects". An object becomes simply a hash table that holds
and functions. For example:
name = "fido",
bark = function (self) print("bark") end
To get inheritance add the simple rule:
if table lookup fails and table has a parent name/value pair then
lookup on the parent value.
More information about the Self-interest