David Bruant (2013-12-29T01:11:58.000Z)
Le 29/12/2013 01:48, Brendan Eich a écrit :
> David Bruant wrote:
>> it's somewhat ironic that Array carries 'from' given it's the only 
>> "class" that doesn't need it per case study for 3) above :-)
>
> But Array is the return type.
It's always the return type of Array.from(x), but not the return type of 
Array.from.call(Whatever, x). I called Array.from "just-from" in my 
previous message as an attempt to reduce the confusion.

In the latest draft, step 1 of Array.from is "Let C be the this value".
There are different return points that all return 'A' and 'A' created at 
step 8.a.i as the result of C.[[Construct]]. And C.[[Construct]] doesn't 
have to return an Array.

That's at least my understanding of the current draft.

"just-from" is a function that turns the iterable passed as argument to 
an array-like. It'll be an Array for Array.from but whetever else for 
Whatever.from.

David
domenic at domenicdenicola.com (2014-01-08T22:20:22.180Z)
It's always the return type of `Array.from(x)`, but not the return type of 
`Array.from.call(Whatever, x)`. I called `Array.from` "just-from" in my 
previous message as an attempt to reduce the confusion.

In the latest draft, step 1 of `Array.from` is "Let C be the this value".
There are different return points that all return 'A' and 'A' created at 
step 8.a.i as the result of C.[[Construct]]. And C.[[Construct]] doesn't 
have to return an Array.

That's at least my understanding of the current draft.

"just-from" is a function that turns the iterable passed as argument to 
an array-like. It'll be an Array for Array.from but whetever else for 
Whatever.from.