On 13.11.2010 0:52, felix wrote:
the D language handles this by having the names '$' and 'length' be the length of the array, within the scope of a [] subscript, so you can say something like a[$-1]. '$' is already too widely used in js, but maybe something like '_' would work. say, if there's no declaration of _ in scope, then _ within [] is the length of the array.


$ and _ -- both are valid identifiers which may already have values. Though, $ is used in regexp and isn't confused with the same name identifier. With the same success any other could be accepted. But, as said -- everyone on this list do not see the need.

Dmitry.

_______________________________________________
es-discuss mailing list
es-discuss@mozilla.org
https://mail.mozilla.org/listinfo/es-discuss

_______________________________________________
es-discuss mailing list
es-discuss@mozilla.org
https://mail.mozilla.org/listinfo/es-discuss

Reply via email to