Re: Harmony classes

2011-06-06 Thread Brendan Eich
On Jun 5, 2011, at 10:59 PM, Kam Kasravi wrote: 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

Re: class sugar: static inheritance

2011-06-06 Thread Mark S. Miller
On Sun, Jun 5, 2011 at 9:35 PM, Peter Michaux petermich...@gmail.comwrote: Are static members inherited? What happens in the last line of the following code? class Monster { static allMonsters = []; constructor() { Monster.allMonsters.push(this); }

Re: Harmony object literals

2011-06-06 Thread Allen Wirfs-Brock
On Jun 6, 2011, at 2:31 AM, Kam Kasravi wrote: In the object literals proposal the following 2 examples are given below: var enhancedArrayProto = Array.prototype | { do (func) {return this.foreach(func)}, search (key {return this.indexOf(key) = 0} }; var myArray =

Re: Harmony object literals

2011-06-06 Thread Brendan Eich
On Jun 6, 2011, at 9:38 AM, Kam Kasravi wrote: I see, the object's prototype is to the left of | and the actual object is to the right. I guess that was made clear in the proposal though I suspect others will invert the relationship since javascript programmers are used to defining the

Re: Feedback and criticism wanted: DOMCrypt API proposal

2011-06-06 Thread David Dahl
- Original Message - From: Bill Frantz fra...@pwpconsult.com To: David Dahl dd...@mozilla.com Cc: es-discuss@mozilla.org Sent: Monday, June 6, 2011 11:00:29 AM Subject: Re: Feedback and criticism wanted: DOMCrypt API proposal On 6/1/11 at 16:01, dd...@mozilla.com (David Dahl) wrote: A

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

2011-06-06 Thread Mike Samuel
2011/6/3 Kyle Simpson get...@gmail.com: I propose a /n flag for regular expressions, which would swap the default capturing/non-capturing behavior between ( ) and (?: ) operators (that is, ( ) would not capture, and (?: ) would capture). The /n property would reflect on the RegExp object as

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

2011-06-06 Thread Brendan Eich
Escapes are a pain, due to the double-backslash burden. We really want quasis for this kind of extensibility. Quasis solve the multiline problem too (I hope... :-). /be On Jun 6, 2011, at 9:52 AM, Mike Samuel wrote: 2011/6/3 Kyle Simpson get...@gmail.com: I propose a /n flag for regular

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

2011-06-06 Thread Mike Samuel
2011/6/6 Brendan Eich bren...@mozilla.com: Escapes are a pain, due to the double-backslash burden. Yep. To fit into this kind of library, you could use a quasi syntax like regexp`...`.ignoreSpaces().nonCapturingByDefault().build() Not as pithy as flags, but extensible via

Re: class sugar: static inheritance

2011-06-06 Thread Bob Nystrom
On Sun, Jun 5, 2011 at 9:35 PM, Peter Michaux petermich...@gmail.comwrote: Based on my understanding of what the desugared code would be, the last line above would be an error because Dragon.allMonsters is undefined. That's correct. Do you have any examples of code where inheriting the

Re: Harmony object literals

2011-06-06 Thread Allen Wirfs-Brock
On Jun 6, 2011, at 11:04 AM, Kam Kasravi wrote: Yes, I did read the rational and see why you put it first, though the cleanest IMHO is var o = { prototype : myProto, a:0, b: function () {} } prototype is a valid property name that does not correspond to the

Re: class sugar

2011-06-06 Thread Allen Wirfs-Brock
(correction copy function below) On Jun 6, 2011, at 10:58 AM, Allen Wirfs-Brock wrote: On Jun 5, 2011, at 7:50 PM, Christopher M. Balz wrote: Are there proposals for fixing, without going as far as making a 'class' system, the major drawback of prototype-based inheritance: Without

Re: class sugar

2011-06-06 Thread Allen Wirfs-Brock
and another... On Jun 6, 2011, at 11:44 AM, Allen Wirfs-Brock wrote: (correction copy function below) On Jun 6, 2011, at 10:58 AM, Allen Wirfs-Brock wrote: On Jun 5, 2011, at 7:50 PM, Christopher M. Balz wrote: Are there proposals for fixing, without going as far as making a 'class'

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

2011-06-06 Thread Gavin Barraclough
Actually this is fixed in ToT WebKit, have closed the stale bug. https://bugs.webkit.org/show_bug.cgi?id=56041 cheers, G. On Jun 5, 2011, at 5:04 PM, Juriy Zaytsev wrote: 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

Re: Thoughts on WeakMaps

2011-06-06 Thread Mark S. Miller
On Mon, Jun 6, 2011 at 2:46 PM, David Bruant david.bru...@labri.fr wrote: Le 06/06/2011 17:41, Mike Samuel a écrit : 2011/6/6 David Bruant david.bru...@labri.fr: The consequence of this second point is wondering whether it's a good idea to standardize WeakMap (instead of Map) at all.