ClassCommon doesn't yet exist, as far as I can tell, until the interpretor is outside the definition block. Though not as pretty as in other languages, you can write it like so:
May class static-function be written inside a class?
Not naturally, no. You'd have to use libraries that let you use a nicer syntax for defining classes. There's no one standardized library I can point you toward. Most of the major libraries -- such as YUI, Closure, and Dojo -- each have their own
Therein lies your problem. JavaScript doesn't have classical inheritance, it has prototypical inheritance, so if you are expecting things to work like Java or C++, you will be disappointed. Even the method described above is not fully equivalent to static methods, it's merely storing a few functions as members of the ClassCommon object, that is the Function object, which you can do for any object.
Great wit and madness are near allied, and fine a line their bounds divide.
Bookmarks