Hi David, > I also am very happy and excited with the new features. > > I have read this in the wiki: > > "this.base(arguments, x) is internally mapped to arguments.callee.call(this, > x). The latter form can be handled by JavaScript natively, which means it is > very efficient. Therefore it is planned to convert the source version code > into the native code while generating the build version that is to be > deployed." > > Does it mean that this.base() will be reworked and optimized by the builder > to be more efficient? > Because some alternatives were proposed by me, but I realized with your > comments that they weren't very efficient (duplicated methods need to be > created). >
Most other solutions of calling the overwritten method of the super class involve wrapping the original function. Since noone knows which method may want to call it's super method, all methods must be wrapped. This would indeet mean a significant overhead. Our current solution just adds a base key to the function objects of the methods. Calling the super method using arguments.callee.base.call is propably the fastest solution with the lowest overhead. the methos this.base is just syntactic sugar for this. The ineffiency is mainly the additional function call to this super. For most situations this will be OK. For all others we plan to optimize this call using the generator. One additional feature is that both the constructor and the prototype now have a pointer to the superclass. This is inspired by the solution you proposed some time ago (http://www.nabble.com/Calling-superclass-methods-p5757736.html). Best Fabian ------------------------------------------------------------------------- Take Surveys. Earn Cash. Influence the Future of IT Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT & business topics through brief surveys-and earn cash http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV _______________________________________________ qooxdoo-devel mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel
