Re: TC39 meeting Wed 5/23/2012

2012-05-30 Thread David Bruant
Le 29/05/2012 21:18, John J Barton a écrit : On Tue, May 29, 2012 at 11:32 AM, Brendan Eichbren...@mozilla.org wrote: John J Barton wrote: This is one of those cases where a small delta creates a very large negative effect. Evidence? If you look back on this thread you will see an example

Re: TC39 meeting Wed 5/23/2012

2012-05-30 Thread John J Barton
On Wed, May 30, 2012 at 12:45 AM, David Bruant bruan...@gmail.com wrote: Le 29/05/2012 21:18, John J Barton a écrit : On Tue, May 29, 2012 at 11:32 AM, Brendan Eichbren...@mozilla.org  wrote: John J Barton wrote: This is one of those cases where a small delta creates a very large negative

Re: TC39 meeting Wed 5/23/2012

2012-05-30 Thread Brandon Benvie
I would say this is one of the places that Node shines, due to providing very easy to use access to the C++ API of V8 directly as JS modules. Straight copying and pasting from v8.h to a module that directly exposes the functions to JS can provide access to most of the tools one would want from JS

Re: TC39 meeting Wed 5/23/2012

2012-05-29 Thread Brendan Eich
John J Barton wrote: On Mon, May 28, 2012 at 10:09 PM, Allen Wirfs-Brock al...@wirfs-brock.com wrote: On May 28, 2012, at 10:03 PM, John J Barton wrote: So let's rewind to my original question. If the discussion about SES is leading us toward more things like freeze(), let's do a better job

Re: TC39 meeting Wed 5/23/2012

2012-05-29 Thread John J Barton
On Mon, May 28, 2012 at 11:23 PM, Brendan Eich bren...@mozilla.org wrote: John J Barton wrote: On Mon, May 28, 2012 at 10:09 PM, Allen Wirfs-Brock al...@wirfs-brock.com  wrote: On May 28, 2012, at 10:03 PM, John J Barton wrote: So let's rewind to my original question.  If the discussion

Re: TC39 meeting Wed 5/23/2012

2012-05-29 Thread Jussi Kalliokoski
I just wanted to add more weight to the fact that frozen objects aren't really the only objects you can't write to; it's the same with primitives (string, number, etc) as well, and all of them fail silently, it's very JSy to fail silently on write: var a = 1; a.x = 2; console.log(a.x); //

Re: TC39 meeting Wed 5/23/2012

2012-05-29 Thread Brendan Eich
Jussi Kalliokoski wrote: I just wanted to add more weight to the fact that frozen objects aren't really the only objects you can't write to; it's the same with primitives (string, number, etc) as well, and all of them fail silently, it's very JSy to fail silently on write: var a = 1; a.x =

Re: TC39 meeting Wed 5/23/2012

2012-05-29 Thread John Tamplin
On Tue, May 29, 2012 at 1:15 PM, John J Barton johnjbar...@johnjbarton.comwrote: 1) The advertised advantages of use strict (https://developer.mozilla.org/en/JavaScript/Strict_mode) seem very minor to me. I've never had any of the problems it solves and -- until recently -- I've never

Re: TC39 meeting Wed 5/23/2012

2012-05-29 Thread Brendan Eich
John Tamplin wrote: 2) I had legacy code using with. You probably want to rewrite such code even if you aren't using SES -- check out the performance implications. And JSLint won't let you use 'with', not even with options (IIRC). John, do you really use JSLint *and* 'with'? Paging

Re: TC39 meeting Wed 5/23/2012

2012-05-29 Thread Anton Kovalyov
FWIW I don't think it's even possible to use JSLint and 'with'. The parser just quits as if it was a syntax error. Anton On Tuesday, May 29, 2012 at 11:40 AM, Brendan Eich wrote: John Tamplin wrote: 2) I had legacy code using with. You probably want to rewrite such code even if

Re: TC39 meeting Wed 5/23/2012

2012-05-29 Thread John J Barton
On Tue, May 29, 2012 at 11:32 AM, Brendan Eich bren...@mozilla.org wrote: John J Barton wrote: This is one of those cases where a small delta creates a very large negative effect. Evidence? If you look back on this thread you will see an example extracted from the case that caused me pain.

Re: TC39 meeting Wed 5/23/2012

2012-05-29 Thread Jussi Kalliokoski
Re: strict mode not throwing in this case, yeah, I'm aware, I was just showing how it is not un-JSy for defining properties to fail. On Tue, May 29, 2012 at 9:30 PM, T.J. Crowder t...@crowdersoftware.comwrote: On 29 May 2012 19:26, Jussi Kalliokoski jussi.kallioko...@gmail.comwrote: I just

Re: TC39 meeting Wed 5/23/2012

2012-05-29 Thread John J Barton
On Tue, May 29, 2012 at 12:08 PM, Anton Kovalyov m...@kovalyov.net wrote: FWIW I don't think it's even possible to use JSLint and 'with'. The parser just quits as if it was a syntax error. Yes this is correct. Anton On Tuesday, May 29, 2012 at 11:40 AM, Brendan Eich wrote: John Tamplin

Re: TC39 meeting Wed 5/23/2012

2012-05-29 Thread Brendan Eich
John J Barton wrote: Anytime you have to debug library code it's a big negative effect. I agree in general. I also see most developers have to do this, some of the time. Modularity is never done enough in practice to save us from this, in JS, C/C++, other languages. Is there a way to debug

Re: TC39 meeting Wed 5/23/2012

2012-05-29 Thread Claus Reinke
If you look back on this thread you will see an example extracted from the case that caused me pain. In the real life case I was using Kris Kowal's Q_COMM library, which builds on Q and is quite sophisticated code. I added a function to a Q_COMM object. Later when I called the function I got an

Re: TC39 meeting Wed 5/23/2012

2012-05-28 Thread David Bruant
Le 28/05/2012 01:37, John J Barton a écrit : On Thu, May 24, 2012 at 11:10 AM, Brendan Eichbren...@mozilla.com wrote: David Bruant wrote: Once we're at it, for the sake of completeness there is probably no harm in adding a Reflect.setPrototype at this point, is there? There is, just as

Re: TC39 meeting Wed 5/23/2012

2012-05-28 Thread T.J. Crowder
On 28 May 2012 06:37, John J Barton johnjbar...@johnjbarton.com wrote: A library writer creates an object in one scope and all of their tests succeed. I use it another scope and my code fails. We are both using legal statements. How can this not be a global effect? You're both using legal

Re: TC39 meeting Wed 5/23/2012

2012-05-28 Thread John J Barton
On May 28, 2012 2:53 AM, T.J. Crowder t...@crowdersoftware.com wrote: On 28 May 2012 06:37, John J Barton johnjbar...@johnjbarton.com wrote: A library writer creates an object in one scope and all of their tests succeed. I use it another scope and my code fails. We are both using legal

Re: TC39 meeting Wed 5/23/2012

2012-05-28 Thread T.J. Crowder
On 28 May 2012 17:34, John J Barton johnjbar...@johnjbarton.com wrote: On May 28, 2012 2:53 AM, T.J. Crowder t...@crowdersoftware.com wrote: On 28 May 2012 06:37, John J Barton johnjbar...@johnjbarton.com wrote: A library writer creates an object in one scope and all of their tests

Re: TC39 meeting Wed 5/23/2012

2012-05-28 Thread Russell Leggett
On Mon, May 28, 2012 at 12:34 PM, John J Barton johnjbar...@johnjbarton.com wrote: On May 28, 2012 2:53 AM, T.J. Crowder t...@crowdersoftware.com wrote: On 28 May 2012 06:37, John J Barton johnjbar...@johnjbarton.com wrote: A library writer creates an object in one scope and all of

Re: TC39 meeting Wed 5/23/2012

2012-05-28 Thread T.J. Crowder
On 28 May 2012 18:46, Russell Leggett russell.legg...@gmail.com wrote: Perhaps this discussion would be aided by a more concrete example. Doh! Excellent idea. John, if you'd like...? (Otherwise I can do one.) -- T.J. ___ es-discuss mailing list

Re: TC39 meeting Wed 5/23/2012

2012-05-28 Thread Brendan Eich
David Bruant wrote: Le 28/05/2012 01:37, John J Barton a écrit : On Thu, May 24, 2012 at 11:10 AM, Brendan Eichbren...@mozilla.com wrote: David Bruant wrote: Once we're at it, for the sake of completeness there is probably no harm in adding a Reflect.setPrototype at this point, is there?

Re: TC39 meeting Wed 5/23/2012

2012-05-28 Thread John J Barton
On Mon, May 28, 2012 at 10:50 AM, T.J. Crowder t...@crowdersoftware.com wrote: On 28 May 2012 18:46, Russell Leggett russell.legg...@gmail.com wrote: Perhaps this discussion would be aided by a more concrete example. Doh! Excellent idea. John, if you'd like...? (Otherwise I can do one.)

Re: TC39 meeting Wed 5/23/2012

2012-05-28 Thread John Tamplin
On Tue, May 29, 2012 at 12:07 AM, John J Barton johnjbar...@johnjbarton.com wrote: function app() { var r = makeExample(); r.discover = function() { console.log(I want to call this function); return 1; }; r.discover(); } The result is an error message at the Uncaught

Re: TC39 meeting Wed 5/23/2012

2012-05-28 Thread Russell Leggett
On Tue, May 29, 2012 at 12:07 AM, John J Barton johnjbar...@johnjbarton.com wrote: On Mon, May 28, 2012 at 10:50 AM, T.J. Crowder t...@crowdersoftware.com wrote: On 28 May 2012 18:46, Russell Leggett russell.legg...@gmail.com wrote: Perhaps this discussion would be aided by a more

Re: TC39 meeting Wed 5/23/2012

2012-05-28 Thread John J Barton
On Mon, May 28, 2012 at 9:33 PM, John Tamplin j...@google.com wrote: On Tue, May 29, 2012 at 12:07 AM, John J Barton johnjbar...@johnjbarton.com wrote: function app() {  var r = makeExample();  r.discover = function() {    console.log(I want to call this function);    return 1;  };  

Re: TC39 meeting Wed 5/23/2012

2012-05-28 Thread John Tamplin
On Tue, May 29, 2012 at 12:45 AM, John J Barton johnjbar...@johnjbarton.com wrote: The only question is whether you get an exception when you create discover() or when you call it. Your code can choose or not to treat adding properties to frozen objects as a fatal error or not, but

Re: TC39 meeting Wed 5/23/2012

2012-05-28 Thread John J Barton
On Mon, May 28, 2012 at 9:41 PM, Russell Leggett russell.legg...@gmail.com wrote: On Tue, May 29, 2012 at 12:07 AM, John J Barton johnjbar...@johnjbarton.com wrote: On Mon, May 28, 2012 at 10:50 AM, T.J. Crowder t...@crowdersoftware.com wrote: On 28 May 2012 18:46, Russell Leggett

Re: TC39 meeting Wed 5/23/2012

2012-05-28 Thread John J Barton
On Mon, May 28, 2012 at 9:54 PM, John Tamplin j...@google.com wrote: On Tue, May 29, 2012 at 12:45 AM, John J Barton johnjbar...@johnjbarton.com wrote: The only question is whether you get an exception when you create discover() or when you call it.  Your code can choose or not to treat

Re: TC39 meeting Wed 5/23/2012

2012-05-28 Thread Axel Rauschmayer
No. I am suggesting that Object.freeze() should not have been added to the language unless an error was thrown when the object is modified, full stop. Having a feature like Object.freeze() that does not give an error when you modify the object is unreasonable. I'm completely baffled that

Re: TC39 meeting Wed 5/23/2012

2012-05-28 Thread Allen Wirfs-Brock
On May 28, 2012, at 10:03 PM, John J Barton wrote: So let's rewind to my original question. If the discussion about SES is leading us toward more things like freeze(), let's do a better job this time. John, could you xplain what you would have done differently with freeze(). It's

Re: TC39 meeting Wed 5/23/2012

2012-05-27 Thread John J Barton
On Thu, May 24, 2012 at 11:10 AM, Brendan Eich bren...@mozilla.com wrote: David Bruant wrote: Once we're at it, for the sake of completeness there is probably no harm in adding a Reflect.setPrototype at this point, is there? There is, just as there's a cost to Object.setPrototypeOf (the

Re: TC39 meeting Wed 5/23/2012

2012-05-27 Thread Brendan Eich
John J Barton wrote: On Thu, May 24, 2012 at 11:10 AM, Brendan Eichbren...@mozilla.com wrote: David Bruant wrote: Once we're at it, for the sake of completeness there is probably no harm in adding a Reflect.setPrototype at this point, is there? There is, just as there's a cost to

Re: TC39 meeting Wed 5/23/2012

2012-05-27 Thread Brandon Benvie
__proto__ has no effect on 1JS. It introduces no new syntax and is partially polyfillable. Poorly and incompletely, but is doable to an extent and definitely isn't backward hostile in the way that pragmas and new syntax are. ___ es-discuss mailing list

Re: TC39 meeting Wed 5/23/2012

2012-05-27 Thread John J Barton
On Sun, May 27, 2012 at 4:41 PM, Brendan Eich bren...@mozilla.com wrote: John J Barton wrote: On Thu, May 24, 2012 at 11:10 AM, Brendan Eichbren...@mozilla.com  wrote: David Bruant wrote: Once we're at it, for the sake of completeness there is probably no harm in adding a

Re: TC39 meeting Wed 5/23/2012

2012-05-27 Thread Allen Wirfs-Brock
On May 27, 2012, at 5:13 PM, John J Barton wrote: ... The reason I asked is that use strict seems to be a subset but acts like another version in some cases. In particular, if a library uses obj.freeze() and the caller modifies the object by adding a property, the caller gets no error

Re: TC39 meeting Wed 5/23/2012

2012-05-27 Thread John J Barton
On Sun, May 27, 2012 at 6:04 PM, Allen Wirfs-Brock al...@wirfs-brock.com wrote: On May 27, 2012, at 5:13 PM, John J Barton wrote: ... The reason I asked is that use strict seems to be a subset but acts like another version in some cases. In particular, if a library uses obj.freeze() and the

Re: TC39 meeting Wed 5/23/2012

2012-05-27 Thread Allen Wirfs-Brock
On May 27, 2012, at 6:42 PM, John J Barton wrote: On Sun, May 27, 2012 at 6:04 PM, Allen Wirfs-Brock al...@wirfs-brock.com wrote: On May 27, 2012, at 5:13 PM, John J Barton wrote: ... The reason I asked is that use strict seems to be a subset but acts like another version in some

Re: TC39 meeting Wed 5/23/2012

2012-05-27 Thread John J Barton
On Sun, May 27, 2012 at 10:09 PM, Allen Wirfs-Brock al...@wirfs-brock.com wrote: ... First rule of strict mode:  use strict only affects code that is lexically within the scope of the directive.  It has no global effect. My example contradicts this claim. No, read the spec.  You seem to be

Subclassing built-in constructors (was: TC39 meeting Wed 5/23/2012)

2012-05-26 Thread David Bruant
Le 24/05/2012 20:10, Brendan Eich a écrit : David Bruant wrote: Thanks for the notes and complements :-) Le 24/05/2012 04:43, Brendan Eich a écrit : Rick Waldron wrote: MM: - From a security perspective, I'd like to move __proto__ out of annex B and into normative body BE: - If MS puts

Re: TC39 meeting Wed 5/23/2012

2012-05-26 Thread Tom Van Cutsem
Hi, If __proto__ is getting standardized, I propose we adapt proxies to be able to trap getPrototypeOf. Why? - with __proto__, stable prototypes are no longer an invariant. It's awkward to make proxies go out of their way to maintain it still. - it's much more consistent with all the other

Re: TC39 meeting Wed 5/23/2012

2012-05-26 Thread David Bruant
Le 26/05/2012 13:53, Tom Van Cutsem a écrit : Hi, If __proto__ is getting standardized, I propose we adapt proxies to be able to trap getPrototypeOf. Why? - with __proto__, stable prototypes are no longer an invariant. It's awkward to make proxies go out of their way to maintain it still.

Re: TC39 meeting Wed 5/23/2012

2012-05-26 Thread Brendan Eich
Tom Van Cutsem wrote: If __proto__ is getting standardized, I propose we adapt proxies to be able to trap getPrototypeOf. Why? - with __proto__, stable prototypes are no longer an invariant. It's awkward to make proxies go out of their way to maintain it still. - it's much more consistent

Re: Subclassing built-in constructors (was: TC39 meeting Wed 5/23/2012)

2012-05-26 Thread Allen Wirfs-Brock
On May 26, 2012, at 2:37 AM, David Bruant wrote: Le 24/05/2012 20:10, Brendan Eich a écrit : ... Not just array -- DOM too. DOM is a very interesting case, because the proto operator was not an option for them since most of them are created by method calls (not even constructors) and

Re: TC39 meeting Wed 5/23/2012

2012-05-26 Thread Brandon Benvie
Excellent! It's actually kind of awkward already if you don't create a pseudo-trap for '__proto__' since treating the property like normal ones leads to incorrect results for various operations like defineProperty, and it doesn't follow normal rules for showing up in property names listing. It's

Re: TC39 meeting Wed 5/23/2012

2012-05-24 Thread Herby Vojčík
Rick Waldron wrote: super LH: - This may be too confusing for the common user AWB: - Asserts that super is defined correctly for classes (explanation) Should super be allowed in all function forms or restricted to classes? Resolution: Defer super outside of classes Any chance to get this

Re: TC39 meeting Wed 5/23/2012

2012-05-24 Thread David Bruant
Thanks for the notes and complements :-) Le 24/05/2012 04:43, Brendan Eich a écrit : Rick Waldron wrote: Triangle Is capable of giving up private names If people have __proto__ they will not use |. I don't know who are people but I'm not one of them. | offered some nice sugar with regard to

Re: TC39 meeting Wed 5/23/2012

2012-05-24 Thread Brendan Eich
David Bruant wrote: Thanks for the notes and complements :-) Le 24/05/2012 04:43, Brendan Eich a écrit : Rick Waldron wrote: Triangle Is capable of giving up private names If people have __proto__ they will not use |. I don't know who are people but I'm not one of them. | offered some nice

TC39 meeting Wed 5/23/2012

2012-05-23 Thread Rick Waldron
# Override Mistake (Allen Wirfs-Brock, Mark Miller) AWB: - The correct people are not here for this discussion, defer to next meeting # 4.14, Unicode (Norbert Lindenderg) NL: - Regular expressions - Certain unclear, discuss with Unicode Consortium see:

Re: TC39 meeting Wed 5/23/2012

2012-05-23 Thread Brendan Eich
Rick, thanks for taking these. I'll try to add a bit of explanation where it looks like you had to be there ;-). /be Rick Waldron wrote: # 4.10 Object.observe (Rafeal Weinstein) Rafeal Weinstein: - Introduction to proposal See: http://wiki.ecmascript.org/doku.php?id=strawman:observe MM: -

Re: TC39 meeting Wed 5/23/2012

2012-05-23 Thread Rick Waldron
Thanks for filling in those blanks -Rick On Wednesday, May 23, 2012 at 7:43 PM, Brendan Eich wrote: Rick, thanks for taking these. I'll try to add a bit of explanation where it looks like you had to be there ;-). /be Rick Waldron wrote: # 4.10 Object.observe (Rafeal Weinstein)

Re: TC39 meeting Wed 5/23/2012

2012-05-23 Thread Norbert Lindenberg
A few additional notes on the items related to internationalization. Norbert On May 23, 2012, at 17:58 , Rick Waldron wrote: # 4.14, Unicode (Norbert Lindenderg) NL: - Regular expressions - Certain unclear, discuss with Unicode Consortium see: