2011/5/29 Dmitry A. Soshnikov dmitry.soshni...@gmail.com
Hi,
Don't get this proposal as a bikesheding, just an idea in case if arrow
functions will win the block-functions.
What about to make a sugar for Array comprehensions based also on arrow
syntax? The same as in Erlang:
let data =
2011/5/29 Dmitry A. Soshnikov dmitry.soshni...@gmail.com
That's it, exactly. We always looking for a shorter sugar. Though, the main
thing that the sugar shouldn't be cryptic at the same time. Probably
Erlang's list comprehensions are cryptic for someone, but again, taking into
account
Errata: + must be *
ListComprehension : '[' Expression '|' IterableOrFilter
(,IterableOrFilter)* ']'
IterableOrFilter: Id '-' ArrayOrGenerator | BooleanFilter
Jose.
___
es-discuss mailing list
es-discuss@mozilla.org
The aim has been consistency. All Array generic own methods that explicitly
use the length property have the same behavior:
- Let lenVal be the result of calling the [[Get]] internal method of O with
argument length.
- Let len be ToUint32(lenVal).
Function.prototype.apply now behave the same
In ES5-15.4 is clearly defined what is an index and what conditions must
verify length
A property name P (in the form of a String value) is an array index if and
only if ToString(ToUint32(P)) is equal to P and ToUint32(P) is not equal to
2^32-1
Every Array object has a length property whose
5 matches
Mail list logo