Selfish (404) is a prototype-based object system.

Archived at [L1 ].


MJ: Really nice work, after playing with it a bit, it really shows the power and ease of prototype based OO. However a [super] call is missing; this will make inheritance less useful than it can be. See also SELF extension.


MJ: Is this a bug in slot lookup?

% set a [selfish::baseObject clone]
% ::selfish::slot ::selfish::baseObject test {} {puts test}
% $a test
SelfishError exception thrown: Could not find slot test

MJ: To answer my own question, this is not a bug, but a different way of cloning from Self. In an Prototype based OO language there are two distinct ways of cloning a prototype [L2 ]. One way is cloning with delegation (like Self) the other way is concatinative prototyping (What Selfish, neo, eos seem to be using). With concatenative cloning, there is no relation after cloning between the prototype and the cloned object.

RLH: Wasn't there more here before?

MS: yes - MJ's code, I think. Now at SELF extension.

MJ: I moved it indeed as it felt like I was hijacking this page, and the code fit better on the SELF extension page.

tb: It seems to me that the page [SELF] was hijacked by TclOO. I remember a different content. Is it lost?

AM No, the code is still there, but the page starts with the TclOO command self, look further down for the original discussion on the language and the emulation by MJ.

EMJ This has now been sorted (I hope), MJ's code is on the SELF extension page.