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

New version of Pooi

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 , Apr 18, 2013
      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 this version (0.8), I've put some emphasis in stability and also have added syntactic sugar for 'obj set "x" 10' which can be entered more naturally as: 'obj.x = 10', obviously regardless of whether x exists in obj or not (it will be created if not).

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

      ==
      (anObject copy) setName "TraitsRectangle"

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

      TraitsRectangle.area = {: self.side1 * self.side2 }

      (TraitsRectangle createChild) setName "Rectangle"

      Rectangle.side1 = 0
      Rectangle.side2 = 0

      (Rectangle copy) setName "r1"

      r1.side1 = 5
      r1.side2 = 6

      r1 area

      r1 str
      ==

      As you can see, it is very much like Self.
      Hope you like it.
      Give it a try and tell me if you like it!

      Cheers,

      Baltasar
    Your message has been successfully submitted and would be delivered to recipients shortly.