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 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 mean by the question.

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 wrote: > > AK> I think we should either deprecate one of the modes, or officially > support multiple modes and provide a method to sw

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

2014-12-19 Thread Jason Orendorff
AK> I think we should either deprecate one of the modes, or officially support multiple modes and provide a method to switch between them. MM> Feel free to consider sloppy mode deprecated. I do. CP> Well sure, but unfortunately it’s not going to just disappear :( MM> See how much good deprecatin

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 > 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 t

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 advantag

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 b

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:15 PM, Mark Miller 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 crafted so that

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:01 PM, Mark S. Miller 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 result would be th

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 wrote: > > > > On Dec 18, 2014, at 10:54 AM, Mark S. Miller wrote: > > > > On Thu, Dec 18, 2014 at 4:46 AM, Alex Kocharin wrote: >> >> >> >> 16.12.2014, 17:04, "Andrea Giammarchi" : >> >> >> >> On Tue, Dec 16, 2014 at 1:50 PM, Felipe Nascimento de

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

2014-12-18 Thread Caitlin Potter
> On Dec 18, 2014, at 10:54 AM, Mark S. Miller wrote: > > > > On Thu, Dec 18, 2014 at 4:46 AM, Alex Kocharin > wrote: > > > 16.12.2014, 17:04, "Andrea Giammarchi" >: >> >> >> On Tue, Dec 16, 2014 at 1:50 PM, Felipe Nasciment

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

2014-12-18 Thread Mark S. Miller
On Thu, Dec 18, 2014 at 4:46 AM, Alex Kocharin wrote: > > > > 16.12.2014, 17:04, "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 ext

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 tur

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

2014-12-18 Thread Alex Kocharin
  16.12.2014, 17:04, "Andrea Giammarchi" :On Tue, Dec 16, 2014 at 1:50 PM, Felipe Nascimento de Moura 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 di

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 wrote: > > 1JS strict mode would look like modules. > jjb -- Dr. Axel Rauschmayer a...@rauschma.de rauschma.de

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

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 una

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 option

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 rauschma.de ___ es-discuss mailing list es-discuss@mozilla.org https://mail.mozilla.org/list