Friday, April 4, 2008

Prototypes and Roles

You can now declare Roles using a new Global function Role:
Role("MyRole", {
...role declaration...

There is also a new feature to do prototype-based object oriented programming with Joose :)
Prototype("MyPrototype", {
...class like declaration...
Prototypes are like classes, but when you do:
or similar the new method will only be added to object but not to the object's class (because it doesn't have one).

No comments: