Lastest ES6 draft (rev 14) now available

Andrea Giammarchi andrea.giammarchi at gmail.com
Fri Mar 8 15:26:32 PST 2013


am I understanding mixin correctly?

'mixin' in Object || (Object.mixin = function mixin(
  target, source
) {
  for(var
    keys = Object.getOwnPropertyNames(source),
    i = keys.length; i--; Object.defineProperty(
      target,
      keys[i],
      Object.getOwnPropertyDescriptor(
        source,
        keys[i]
      )
    )
  );
  return target;
});

thanks


On Fri, Mar 8, 2013 at 2:35 PM, Allen Wirfs-Brock <allen at wirfs-brock.com>wrote:

> The March 8, 2013 Rev 14 draft is now available at the usual place:
> http://wiki.ecmascript.org/doku.php?id=harmony:specification_drafts
>
> Changes include:
>
>    - Class bodies are now always string
>     - *static* methods may now be defined in *ClassBody*
>     - Updated comprehension syntax to use left-to-right order
>     - Eliminated *is* and *isnt* operators
>     - added grammar productions to allow unqualified super to be used
>    after new operator
>     - expression to the right of *of* in *for-of* now restricted to being
>    *AssignmentExpression*
>     - Almost all Chapter 15 constructors are now specified to have an
>    @@create methid and are initialized in a manner that supports subclassing.
>    (still need to work on Function)
>     - Added Object.getOwnPropertyKeys function
>     - Added Object.is function
>     - Tentatively added Object.mixin function
>     - Array.from now takes an optional map function
>     - Added String.prototype.normalize method
>     - All String.prototype methods that accept RegExp arguments will now
>    work with subclasses of RegExp
>     - Renamed Number.prototype.toInt to Number.prototype.toInteger
>     - RegExp global, ignoreCase, multiline, source, sticky are now
>    prototype accessor properties rather than instance own data properties.
>    This is needed to support adding web compatible compile method.
>     - Added new RegExp.prototype methods that allow string methods to
>    work with RegExp subclasses: match, replace, search, split, @@isRegExp
>     - Map and Set constructors now accept a =n optional comparator
>    parameter. Only value currently allowed is “is”
>     - ArrayBuffer and *Typed*Array object length no long restricted to 232limit
>     - Eliminated all remaining references to [[Class]] and
>    [[NativeBrand]] (except for in some DataView code that needs rewritting
>    anyway)
>     - Added SameValueZero abstraction operation that considers -0 and +0
>    to be the same value.
>     - Rename [[GetP]] to [[Get]] and [[SetP]] to [[Set]]
>     - Specified that unless otherwise indicated, internal data properties
>    are created when an object is allocated. Internal data properties are now
>    explicitly listed in ObjectCreate abstract operation calls.
>     - internally consolidated [[IsExtensible]]/[[IsSealed]/[[IsFrozen]]
>    and [[PreventExtensions]]/[[Seal]]/[[Freeze]] into two MOP operations
>    [[HasIntegrity]] and [[SetIntegrity]]. However, no public APIs (Proxy traps
>    and Reflect functions) changed.
>     - Numerous editorial and technical corrections, clarifications, and
>    bug fixes
>
>
>
> _______________________________________________
> es-discuss mailing list
> es-discuss at mozilla.org
> https://mail.mozilla.org/listinfo/es-discuss
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.mozilla.org/pipermail/es-discuss/attachments/20130308/425c6010/attachment.html>


More information about the es-discuss mailing list