Pooi: A prototypical object-oriented interpreter

Baltasar baltasarq at gmail.com
Sun Dec 16 19:18:18 UTC 2012


Hi, Selfers:

I have talked here, some time ago, about Pooi, an interpreter much in the same line than Self:

http://trevinca.ei.uvigo.es/~jgarcia/TO/pooi/index.html

This is a program I mostly code in my spare time, not a real research project. Anyway, I've added method support to Pooi. The [new] syntax is the same one as in infix arithmetic operations.

For example, you can try it by entering the following instructions:

==
(anObject copy) setName "TraitsRectangle"

TraitsRectangle set "str" {: ((self.side1 str) + ", ") + (self.side2 str) }

TraitsRectangle set "area" {: self.side1 * self.side2 }

(TraitsRectangle createChild) setName "Rectangle"

(Rectangle set "side1" 0) set "side2" 0

(Rectangle copy) setName "r1"

(r1 set "side1" 5) set "side2" 5

r1 area

r1 str
==

As you can see, it is very much like Self.
Hope you like it.





More information about the Self-interest mailing list