напомню сорс инициализации класса Array

Код:
function Array () {
ASSetPropFlags(this, null, 0);
var length = arguments[0];
if ((arguments.length != 1) || (typeof (length) != "number")) {
length = arguments.length;
var i = 0;
while (i < length) {
this[i] = arguments[i];
i++;
}
}
this.length = length;
}
var o = Array.prototype;
o.push = function (v) {
var i = 0;
while (i < arguments.length) {
this[this.length] = arguments[i];
i++;
}
return (this.length);
};
o.pop = function () {
var i = (this.length - 1);
var r = this[i];
this.length = i;
return (r);
};
o.concat = function () {
var r = [];
var n = this.length;
var i = 0;
while (i < this.length) {
r[i] = this[i];
i++;
}
i = 0;
while (i < arguments.length) {
var a = arguments[i];
if (AsInstanceOf(a, Array.prototype)) {
var j = 0;
while (j < a.length) {
r[n++] = a[j];
j++;
}
} else {
r[n++] = a;
}
i++;
}
return (r);
};
o.shift = function () {
var r = this[0];
this.splice(0, 1);
return (r);
};
o.unshift = function (v) {
var n = arguments.length;
if (n > 0) {
var i = this.length;
while (((i = (i+1))) >= 0) {
this[i + n] = this[i];
}
i = 0;
while (i < n) {
this[i] = arguments[i];
i++;
}
}
return (this.length);
};
o.slice = function (iA, iB) {
iA = AsClamp2(iA, 0, this.length);
if (typeof (iB) == "undefined") {
iB = this.length;
}
iB = AsClamp2(iB, 0, this.length);
var r = [];
var i = iA;
while (i < iB) {
r[r.length] = this[i];
i++;
}
return (r);
};
o.join = function (sep) {
if (typeof (sep) == "undefined") {
sep = ",";
}
var r = "";
var i = 0;
while (i < this.length) {
if (i != 0) {
r = r + sep;
}
r = r + this[i];
i++;
}
return (r);
};
o.splice = function (iSpl, nDel) {
if (!arguments.length) {
return;
}
iSpl = AsClamp2(iSpl, 0, this.length);
if (arguments.length == 1) {
nDel = this.length - iSpl;
} else {
nDel = AsClamp(nDel, 0, this.length - iSpl);
}
var nInsert = Math.max(arguments.length - 2, 0);
var nMove = (nDel - nInsert);
var i;
var r = this.slice(iSpl, iSpl + nDel);
if (nMove > 0) {
i = iSpl;
while (i < (this.length - nMove)) {
this[i] = this[i + nMove];
i++;
}
this.length = i;
} else {
i = this.length;
while (iSpl <= ((i = (i+1)))) {
this[i - nMove] = this[i];
}
}
i = 0;
while (i < nInsert) {
this[iSpl + i] = arguments[i + 2];
i++;
}
return (r);
};
o.toString = function () {
return (this.join());
};
o.qsort = function (lo, up, cf) {
while (lo < up) {
var i = lo;
var j = up;
var t = this[lo];
while (i < j) {
while (cf(this[j], t) > 0) {
j--;
}
this[i] = this[j];
while ((i < j) && (cf(this[i], t) <= 0)) {
i++;
}
this[j] = this[i];
}
this[i] = t;
if ((i - lo) < (up - i)) {
this.qsort(lo, i - 1, cf);
lo = i + 1;
} else {
this.qsort(i + 1, up, cf);
up = i - 1;
}
}
};
o.sort = function (cf) {
if (typeof (cf) == "undefined") {
cf = function (x, y) {
x = string (x);
y = string (y);
if (x >= y) {
if (y >= x) {
0 ;
} else {
1 ;
}
} else {
}
return (-1);
};
}
this.qsort(0, this.length - 1, cf);
return (this);
};
o.reverse = function () {
var i = 0;
var j = (this.length - 1);
while (i < j) {
var t = this[i];
this[i++] = this[j];
this[j--] = t;
}
return (this);
};
ASSetPropFlags(o, null, 3);
я вот не понял, если тебя не устраивает спецификация , следовательно ты можешь предложить лучшую? или где? :)