Mile Zero[/url]":1hpw7roe]I have seen people do horrible things with call and function closures for inheritance. The JavaScript mode in Ace does something like this:
Code:
var Mode = function() { /* constructor */ };
(function() {
this.prototypeProperty = "something";
}).call(Mode.prototype);
They do this because they've already called an inheritance function on the Mode, so they can't just blow away the prototype, and for some ungodly reason they won't just do:
.
I like Ace, but like any large codebase it has its fair share of WTF moments.