Re: The other constructors: Object.create() and String.fromCharCode()

2011-06-05 Thread Dmitry A. Soshnikov
On 05.06.2011 22:00, Peter Michaux wrote: ES has "new Constructor()" as its basic syntax for construction. This means that if other constructors are also beneficial that the syntax to call them is inconsistent. For example, ES3 had the "String.fromCharCode" and ES5 added "Object.create". This i

Re: The other constructors: Object.create() and String.fromCharCode()

2011-06-05 Thread Brendan Eich
On Jun 5, 2011, at 11:00 AM, Peter Michaux wrote: > (I remember the idea of being able to write "String.new" rather than > having to write "String['new']" was discussed in the past. I don't > know if keywords as bare object keys are allowed in ECMAScript but it > seems to work in Firefox.) It's i

The other constructors: Object.create() and String.fromCharCode()

2011-06-05 Thread Peter Michaux
ES has "new Constructor()" as its basic syntax for construction. This means that if other constructors are also beneficial that the syntax to call them is inconsistent. For example, ES3 had the "String.fromCharCode" and ES5 added "Object.create". These are both constructors of sorts. Would it be po