Garrett Smith wrote:
> obj = {dontenum length: 10} );
> vs.
>
> obj = {length: 10};
> obj.propertyIsEnumerable("length", false);
>
> Which is more ugly?
>
> Garrett
Of course I prefere the first line but these two cases are different.
I wonder if a builtin method will not cause more problems instead of
avoiding them.
What I mean is what is the expected behaviour in this case?
Object.prototype.propertyIsEnumerable("length", false);
// some stuff ... and then ...
Object.prototype.propertyIsEnumerable("length", true);
I think Object.prototype is the perfect case scenario where this built in
method could cause more chaos than ever, while the dontenum in declaration
makes sense specially when I write my own object and/or prototoype and I would
like that no one will be able to change my not enumerable property. So I guess
built in method is error/conflicts/problems prone while the first one is quite
safer (and at the same time, I do like to know if others add some
Object.prototype, both to avoid conflicts, problems, and errors)
These are only my 5 cents to this interesting discussion.
Kind Regards
--
---------------------------------
Zend Certified Engineer
ActionScript 2.0 Certified Developer
Web 2.0 Specialist
---------------------------------
Cel. +39 338 7621067
_______________________________________________
Es4-discuss mailing list
[email protected]
https://mail.mozilla.org/listinfo/es4-discuss