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 in ES5.

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 is a

Re: Default non-capturing regex flag [WAS: how to create strawman proposals?]

2011-06-05 Thread Brendan Eich
On Jun 3, 2011, at 10:49 AM, Juriy Zaytsev wrote: Chrome (13) and Safari (5) tolerate n. No error. Bugs filed? /be ___ es-discuss mailing list es-discuss@mozilla.org https://mail.mozilla.org/listinfo/es-discuss

Re: how to create strawman proposals?

2011-06-05 Thread David Herman
The point is to encourage people to write *more* well-thought-out proposals than can fit in an email, not less. Hence Allen's suggestion of blogs, websites, or github. If language design issues can be resolved in bursts of 140 characters then I think I will need to find a new line of work. ;)

Re: Default non-capturing regex flag [WAS: how to create strawman proposals?]

2011-06-05 Thread Juriy Zaytsev
On Sun, Jun 5, 2011 at 5:30 PM, Brendan Eich bren...@mozilla.com wrote: On Jun 3, 2011, at 10:49 AM, Juriy Zaytsev wrote: Chrome (13) and Safari (5) tolerate n. No error. Bugs filed? WebKit bug — https://bugs.webkit.org/show_bug.cgi?id=41614 Seems to be stalled. cc'ing Oliver. --

class sugar: static inheritance

2011-06-05 Thread Peter Michaux
Are static members inherited? What happens in the last line of the following code? class Monster { static allMonsters = []; constructor() { Monster.allMonsters.push(this); } } class Dragon extends Monster { constructor() {} } new

Harmony classes

2011-06-05 Thread Kam Kasravi
From the harmony classes example copied below for reference. The set health(value) {...} assigns a new value to this.health. But health is a private property, so the assignment is setting a public property. Shouldn't the assignment be private(this).health = value? class Monster { // The