Calilasseia wrote:
- Code: Select all
myObject.prototype.whatDoesThisDo = function(selector) {
this.saved = selector;
if (selector !== NULL_VALUE)
{
if (this.pList.length == 0)
this.fList[selector].apply(this);
else
this.fList[selector].apply(this, this.pList);
}
}
Not much. It discerns whether a list\array contains anything, and if so, runs the function\method 'apply' with 2 parameters instead of one.
Typical shitty javascript OO code, with its layers of self referential abstraction, objects passing themselves to themselves, tying the programmer up with his own self-made mess of pointless abstractions, sidelining actually functionality
I avoid OO where possible and Java where possible. Go watch Brian Will on why OO is bad. But fine by me if you don't. OO is a boon to programmers who know that OO is shite. Because non-OO programmers can get shit done a lot faster and better than the mass of fools stuck in the OO quagmire.
I'll go and attend to the other 19,276 lines of code now.
Not that big. wtf is it supposed to do?