ES4 draft LAST CALL: Object

Nathan de Vries nathan at atnan.com
Fri Mar 21 07:36:56 PDT 2008


I much prefer Yuh-Ruey Chen's suggestion of rolling the last three  
arguments of __createProperty__ into a single bitmask argument:

   public dynamic class Object
   {
     static const READ_ONLY: AttrToken = new AttrToken;
     static const DONT_DELETE: AttrToken = new AttrToken;
     static const DONT_ENUMERATE: AttrToken = new AttrToken;

     intrinsic function __createProperty__(name, value, mask) : void …
   }

   function Foo() {
     this.__createProperty("bar", [], Object.READ_ONLY &  
Object.DONT_DELETE & Object.DONT_ENUMERATE);
   }

In terms of extensibility & call-site readability, this seems like  
the way to go for me.


Cheers,

--
Nathan de Vries


More information about the Es4-discuss mailing list