Wednesday, September 10, 2008

Refactoring Joose

One of the main features of the next Joose release will be the ability to make extending the class and role building syntax very easy.

Consider this example:
Class("MyClass", {
methods: {

primaryKey: "id"

primaryKey is not a regular property of the class builder. However, the class initializer will attempt to call the method handlePropprimaryKey on the meta class which can then do whatever it wants with the property.

This enables very declarative and special-case class construction styles.

While this has been in Joose for a couple of weeks, up until now there have been special cases for the "standard" class construction properties like "methods" and "has". As of this commit these special cases where completely eliminated.

No comments: