Friday, March 24th, 2006
Dean Edwards and Another Base.js
Dean Edwards is a smart man, and wasn’t happy with any Base classes out there in various libraries so he wrote his own Base.js.
His goals:
- I want to easily create classes without the MyClass.prototype cruft
- I want method overloading with intuitive access to the overloaded method (like Java’s super)
- I want to avoid calling a class’ constructor function during the prototyping phase
- I want to easily add static (class) properties and methods
- I want to achieve the above without resorting to global functions to build prototype chains
- I want to achieve the above without affecting Object.prototype
Check out Dean’s Base.js







Good stuff, but I was confused at first with this.inherit(), I thought it was more of a declaration of inheritence (like .extend() is), not calling an overridden method.
I agree that this is good stuff, but I also think it’s funny that we feel a need to “fix” javascript so that it looks more like a class based, declarative language than a prototype based one.
Maybe the emergence of Ajax and the influx of developers used to strongly typed languages will drive some innovations and changes in Javascript. One can only hope.
P.S. Can we go back to calling it Livescript again? ;-)
ahahah good idea, i’m tired to have to explain that JavaScript have nothing to do with Java