AOP Compatibility

Kris Zyp kris at
Wed Feb 20 16:21:25 PST 2008

> Absolutely not with fixtures, but you can put the prototype qualifier  in 
> front of function definitions in classes to create prototype  methods just 
> like the ones in ES3's builtins, and you can make your  class dynamic 
> (although IIRC, all class objects where static  properties live are 
> mutable; class *instances* are fixed unless the  class is dynamic --  
> Graydon or Jeff should correct me if I'm wrong).

Of course a library function (like dojo.connect) that is called to advise a 
method on an object doesn't have control of how the object was created. If 
it is an instance of user class (and not dynamic), this function will this 
fail. This functionality is pretty core and heavily used by Dojo and I 
believe is used by other libraries as well. Of course existing code will 
continue to work, but it will be disappointing to find this function fail 
for new objects created with ES4 functionality. I don't know an easier 
solution, other than real AOP support.

More information about the Es4-discuss mailing list