Re: What would a 1JS-friendly strict mode look like?

2014-12-19 Thread Bradley Meck
Can you even deprecate sloppy mode? I know dev tools often use it to inject the dev console extension APIs safely On Fri, Dec 19, 2014 at 10:55 AM, Jason Orendorff jason.orendo...@gmail.com wrote: AK I think we should either deprecate one of the modes, or officially support multiple modes and

Re: What would a 1JS-friendly strict mode look like?

2014-12-19 Thread Mark S. Miller
On Fri, Dec 19, 2014 at 9:08 AM, Bradley Meck bradley.m...@gmail.com wrote: Can you even deprecate sloppy mode? If you mean, can we get rid of it? Then no. If you mean, can we discourage people from using it, and sneer at the people who still do? Then yes. Otherwise, please clarify what you

Re: What would a 1JS-friendly strict mode look like?

2014-12-18 Thread Alex Kocharin
  16.12.2014, 17:04, "Andrea Giammarchi" andrea.giammar...@gmail.com:On Tue, Dec 16, 2014 at 1:50 PM, Felipe Nascimento de Moura felipenmo...@gmail.com wrote: function () {    use strict, safe;} This could allow us to even add some extra scoped-options, such as a safe mode..  I'm quite sure we've

Re: What would a 1JS-friendly strict mode look like?

2014-12-18 Thread Felipe Nascimento de Moura
Wouldn't it be interesting to have a scope variable? as is arguments... Something like function(){ window.scope.set('strict', true); } of function(){ scope.set({ strict: true, experimental: true, safe: false }); // then, other functions could turn

Re: What would a 1JS-friendly strict mode look like?

2014-12-18 Thread Mark S. Miller
On Thu, Dec 18, 2014 at 8:50 AM, Caitlin Potter caitpotte...@gmail.com wrote: On Dec 18, 2014, at 10:54 AM, Mark S. Miller erig...@google.com wrote: On Thu, Dec 18, 2014 at 4:46 AM, Alex Kocharin a...@kocharin.ru wrote: 16.12.2014, 17:04, Andrea Giammarchi andrea.giammar...@gmail.com:

Re: What would a 1JS-friendly strict mode look like?

2014-12-18 Thread Till Schneidereit
On Thu, Dec 18, 2014 at 6:01 PM, Mark S. Miller erig...@google.com wrote: (1,eval)( + function(){...strict code you want to execute sloppy...})() This doesn't work in SpiderMonkey: stringifying functions retains their strictness, no matter where strict mode is activated. In this case, the

Re: What would a 1JS-friendly strict mode look like?

2014-12-18 Thread Mark Miller
I didn't know that SpiderMonkey did that, but I agree it is better. In light of this news, I'm glad my code sample doesn't work ;). As for would be good for all engines to act the same, the precondition was carefully crafted so that engines did not need to retain the original source, but rather,

Re: What would a 1JS-friendly strict mode look like?

2014-12-18 Thread Till Schneidereit
On Thu, Dec 18, 2014 at 6:15 PM, Mark Miller erig...@gmail.com wrote: I didn't know that SpiderMonkey did that, but I agree it is better. In light of this news, I'm glad my code sample doesn't work ;). As for would be good for all engines to act the same, the precondition was carefully

Re: What would a 1JS-friendly strict mode look like?

2014-12-18 Thread Felipe Nascimento de Moura
did anyone see my suggestion? (actually, am not sure my e-mails are going out!) Personally(again, my opinion), I think it is at least weird, having a floating string on your code! Specially because(by now) this is the only situation, with only one option, what makes it an exception. ES has so

Re: What would a 1JS-friendly strict mode look like?

2014-12-18 Thread Till Schneidereit
On Thu, Dec 18, 2014 at 6:50 PM, Felipe Nascimento de Moura felipenmo...@gmail.com wrote: did anyone see my suggestion? (actually, am not sure my e-mails are going out!) Personally(again, my opinion), I think it is at least weird, having a floating string on your code! Specially because(by

Re: What would a 1JS-friendly strict mode look like?

2014-12-18 Thread Felipe Nascimento de Moura
ok, makes sense! The fact that this works at the compile time, really makes it impossible to modify from scope to scope! It was just a suggestion, syntax or the way it could be implemented was not supposed to be exactly like that...but I think it might be interesting if we had some of the

Re: What would a 1JS-friendly strict mode look like?

2014-12-18 Thread Brendan Eich
Till Schneidereit wrote: On Thu, Dec 18, 2014 at 6:15 PM, Mark Miller erig...@gmail.com mailto:erig...@gmail.com wrote: I didn't know that SpiderMonkey did that, but I agree it is better. In light of this news, I'm glad my code sample doesn't work ;). As for would be good for all

Re: What would a 1JS-friendly strict mode look like?

2014-12-17 Thread Axel Rauschmayer
That makes sense, yes. It’s great that we get this chance to clean up things in ECMAScript 6. On 16 Dec 2014, at 16:46, John Barton johnjbar...@google.com wrote: 1JS strict mode would look like modules. jjb -- Dr. Axel Rauschmayer a...@rauschma.de rauschma.de

What would a 1JS-friendly strict mode look like?

2014-12-16 Thread Axel Rauschmayer
Given 1JS – would strict mode have been done differently in hindsight? How? Thanks! Axel -- Dr. Axel Rauschmayer a...@rauschma.de mailto:a...@rauschma.de rauschma.de ___ es-discuss mailing list es-discuss@mozilla.org

Re: What would a 1JS-friendly strict mode look like?

2014-12-16 Thread Felipe Nascimento de Moura
Interesting question! I always found it weird, myself! function () { use strict; } It might be a new token, perhaps? function () { use strict, safe; } This could allow us to even add some extra scoped-options, such as a safe mode...I am pretty sure you guys would have even more options

Re: What would a 1JS-friendly strict mode look like?

2014-12-16 Thread Andrea Giammarchi
On Tue, Dec 16, 2014 at 1:50 PM, Felipe Nascimento de Moura felipenmo...@gmail.com wrote: function () { use strict, safe; } This could allow us to even add some extra scoped-options, such as a safe mode.. I'm quite sure we've discussed already other directives and the unanimous

Re: What would a 1JS-friendly strict mode look like?

2014-12-16 Thread John Barton
1JS strict mode would look like modules. jjb ___ es-discuss mailing list es-discuss@mozilla.org https://mail.mozilla.org/listinfo/es-discuss