Loading ...
Sorry, an error occurred while loading the content.

Pooi: A prototypical object-oriented interpreter

Expand Messages
  • Baltasar
    Hi, Selfers: I have talked here, some time ago, about Pooi, an interpreter much in the same line than Self:
    Message 1 of 1 , Dec 16, 2012
    • 0 Attachment
      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.
    Your message has been successfully submitted and would be delivered to recipients shortly.