Approach of new Object methods in ES5

Asen Bozhilov asen.bozhilov at
Fri Apr 16 07:18:48 PDT 2010

2010/4/16, Dmitry A. Soshnikov <dmitry.soshnikov at>:

> By the way, it is also petty that there's no ability to change prototype
> and there is only "get" function for that; __proto__ extension in this
> case was better.

Especially when I want to change only [[Prototype]] and keep values of
other internal properties and methods for that object.

And I have a question. Why ES5 give control on values of internal
attributes? What will improve that? "Save" augmentation of built-in?
Good design of JS libraries?

Instead of that I want just naming convention improvements + `const`
keyword as Mozilla implement.

For example:

myObj.CONSTANT = 3.14;

And I expect property `CONSTANT` to have internat attributes
{DontDelete), {ReadOnly}. But I forgot, Crockford suggest upper case
only for global variables.

If they was added new loop, misconseptions of JS library authors will
be gone away. For example if there is:

for own(var i in obj) {
    //do something with next own property

And my last question is. Why do you change terminology in ES5? What
was wrong with ES3 terminology?

More information about the es-discuss mailing list