TC39 won't lie => TC39 won't like

On Wed, May 22, 2013 at 6:22 PM, Andrea Giammarchi <
andrea.giammar...@gmail.com> wrote:

> I never hold on on polyfills, I already use Object.mixin in redefine.js
> and other personal code ;-)
>
> I think the direction is that second argument to N extra is an old pattern
> TC39 won't lie for any new API
>
>
> On Wed, May 22, 2013 at 6:18 PM, Dmitry Soshnikov <
> dmitry.soshni...@gmail.com> wrote:
>
>> Please hold on with pollyfilling, until we realize this is something is
>> really required and can be useful. If it's not, this should be changed to
>> multiple arguments. Since this "potential" map is not even in current
>> draft, I believe Rick refers to something that was never taken as a real
>> thing to apply.
>>
>> Dmitry
>>
>>
>> On Wed, May 22, 2013 at 6:13 PM, Andrea Giammarchi <
>> andrea.giammar...@gmail.com> wrote:
>>
>>> I think `[mixin1, mixin2, mixin3].reduce(Object.mixin, source);` is a
>>> win, only thing I am not sure, is how this third argument could make into
>>> this approach (if reusable, I didn't even know about this extra arg)
>>>
>>> Any hint on the extra arg appreciated for polyfill purpose, thanks
>>>
>>>
>>> On Wed, May 22, 2013 at 6:00 PM, Dmitry Soshnikov <
>>> dmitry.soshni...@gmail.com> wrote:
>>>
>>>>
>>>> On Wed, May 22, 2013 at 5:53 PM, Rick Waldron 
>>>> <waldron.r...@gmail.com>wrote:
>>>>
>>>>>
>>>>>
>>>>>
>>>>> On Wed, May 22, 2013 at 7:48 PM, Dmitry Soshnikov <
>>>>> dmitry.soshni...@gmail.com> wrote:
>>>>>
>>>>>> Hello,
>>>>>>
>>>>>> It's very likely it was (should have been I believe) discussed
>>>>>> before, and even probably was approved, but I don't see it in the latest
>>>>>> draft yet.
>>>>>>
>>>>>
>>>>> The following has been discussed, but...
>>>>>
>>>>>
>>>>>>
>>>>>> Just to make sure, the signature of the "assign" and "mixin" method
>>>>>> should be:
>>>>>>
>>>>>> Object.assign(target, source,[source2, ..., sourceN]);
>>>>>> Object.mixin(target, source,[source2, ..., sourceN]);
>>>>>>
>>>>>> Current draft shows me only one source for both the methods.
>>>>>>
>>>>>
>>>>> That's correct. The third argument is being reserved for a descriptor
>>>>> map (potentially). Object.assign is not specified to match the _exact_
>>>>> behaviour of any existing object "merge", "extend", "mixin" operation.
>>>>>
>>>>>
>>>> OK, good to know. Can you show a practical example with this
>>>> (potential) descriptor map argument? Just wanna make sure it's really more
>>>> useful than accepting multiple sources.
>>>>
>>>>
>>>>> This is not unreasonable:
>>>>>
>>>>> function merge(target, ...sources) {
>>>>>   return sources.reduce(Object.assign, target);
>>>>> }
>>>>>
>>>>
>>>> Sure. The question is not that we can write own abstraction on top of
>>>> existing behavior, the question is having it out of the box. Unless the
>>>> descriptor map you mention really worth it.
>>>>
>>>> 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