ES4 draft: Object

Ian Hickson ian at
Mon Mar 10 22:19:31 PDT 2008

On Mon, 10 Mar 2008, Waldemar Horwat wrote:
> > intrinsic function propertyIsEnumerable(name: EnumerableId, flag: 
> > (boolean|undefined) = undefined): boolean
> I too find the second parameter here abhorrent.  Please find another way 
> to solve it (Brendan's namespace idea maybe) or remove this feature 
> altogether.

I believe what Waldemar is saying is that the method has a name that 
implies that it is a getter, but that the proposal has it working as a 
setter. This has a number of disadvantages. Primarily, it is unintuitive 
for authors. This makes code maintenance significantly more complicated, 
as readers of code tend to assume that getters cannot have side effects. 
This leads directly to bugs.

We should design ES4 in a way that someone who is experienced with other 
programming languages, but who has never learnt ES4, can by and large 
correctly guess what any arbitrary ES4 code is doing. In this particular 
case, we have failed to achieve that.

Ian Hickson               U+1047E                )\._.,--....,'``.    fL       U+263A                /,   _.. \   _\  ;`._ ,.
Things that are impossible just take longer.   `._.-(,_..'--(,_..'`-.;.'

More information about the Es4-discuss mailing list