Comments on Sept Meeting Notes

Kevin Smith zenparsing at
Fri Sep 27 21:44:05 PDT 2013

All the noise we made about Object.extend was unclear? From jQuery:
> Many similar functions, going back to Prototype's Object.extend:
> Object.extend = function(destination, source) {
>   for (var property in source)
>     destination[property] = source[property];
>   return destination;
> };

Thanks.  I believe this supports my position.  Regardless of how @iterator
is defined, consider this:

    extendObject(target, someObjectWithIterator);

If `someObjectWithIterator` has an @iterator method (be it string or symbol
keyed), I would expect that after this statement runs, `target` would also
have that @iterator method.  To write it a different way:

    extendObject(target, {
      "@iterator"() {}


    extendObject(target, {
      [Symbol.iterator]() {}

Either way I would be surprised if the "iterator" function was **not**
copied.  I think this example argues for enumerability, at least in some
cases.  Or equivalently, not all meta-level hooks appear to want

{ Kevin }
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <>

More information about the es-discuss mailing list