Re: Global lexical tier

2015-09-03 Thread Andreas Rossberg
On 3 September 2015 at 03:50, Brendan Eich wrote: > Andreas Rossberg wrote: > >> On 3 September 2015 at 01:58, Brendan Eich bren...@mozilla.org>> wrote: >> >> I was there, I just re-read and re-remembered. I do not agree with >> Allen that some

Re: Global lexical tier

2015-09-03 Thread saam barati
After reading through past threads and meeting notes, I've changed my opinion. I think the current spec is OK and meets the real needs of programs today. I've ran into real programs that break without the global lexical tier while implementing this inside JavaScriptCore. While I don't think global

Re: Global lexical tier

2015-09-03 Thread saam barati
here with regards to considering >> alternate >> implementations by having some form of "const" being visible across >> multiple JS programs for a while now. >> > > This property of top-level const being visible across mutliple programs > (script el

Re: Global lexical tier

2015-09-03 Thread Brendan Eich
Andreas Rossberg wrote: On 3 September 2015 at 03:50, Brendan Eich > wrote: I don't remember you overcoming the counterarguments about async scripts and event handlers in async-generated/written markup twisting the nested scopes

Re: Global lexical tier

2015-09-03 Thread Brendan Eich
As you probably read (agreed, notes are strung out and not well-indexed), we considered that too. It fell to the objection that users certainly want const and class declarations from one script to be usable in subsequent scripts. For let, we didn't want to break symmetry with const and class

Re: Global lexical tier

2015-09-03 Thread Brendan Eich
t elements) holds under the current ES6 spec (global lexical tier). Were you remarking on how const under the counter-proposal Jason brought up would bind a global object property? Otherwise the multiple-programs-see-one-program's-const situation doesn't change from either proposal to

Re: Global lexical tier

2015-09-03 Thread Andreas Rossberg
On 3 September 2015 at 20:57, Brendan Eich wrote: > Andreas Rossberg wrote: > >> On 3 September 2015 at 03:50, Brendan Eich bren...@mozilla.org>> wrote: >> >> I don't remember you overcoming the counterarguments about async >> scripts and event

Re: Global lexical tier

2015-09-03 Thread Brendan Eich
Allen Wirfs-Brock wrote: On Sep 2, 2015, at 4:58 PM, Brendan Eich wrote: > saam barati wrote: >> Thanks. Reading now. >> >> I'm clearly bad at email :/ > > Naw, this stuff is always harder to find than it should be. > > I was there, I just re-read and re-remembered. I do not agree

Re: Global lexical tier

2015-09-03 Thread Allen Wirfs-Brock
On Sep 3, 2015, at 2:30 PM, Brendan Eich wrote: >> \ > > Global script is global, though. I don't see how you can have > > > class Widget {...} > > ... > > let w = new Widget(); > ... > > > fail for want of an extra step to export Widget from the first script and > import it into the

Re: Global lexical tier

2015-09-03 Thread Brendan Eich
Andreas Rossberg wrote: What I mean is that in a model with mutable scope (or worse, the global object) _declarations_ themselves become global effects. Later conflicts can affect all code that has been loaded _before_, e.g. by smashing over an existing binding. I get it, but this is just

Re: Global lexical tier

2015-09-02 Thread Andreas Rossberg
On 3 September 2015 at 01:58, Brendan Eich wrote: > I was there, I just re-read and re-remembered. I do not agree with Allen > that some tiny needle was uniquely threaded. Rather, an aesthetic > preference for the new ES6 binding forms to have a lexical contour of their >

Re: Global lexical tier

2015-09-02 Thread Brendan Eich
saam barati wrote: Thanks. Reading now. I'm clearly bad at email :/ Naw, this stuff is always harder to find than it should be. I was there, I just re-read and re-remembered. I do not agree with Allen that some tiny needle was uniquely threaded. Rather, an aesthetic preference for the new

Re: Global lexical tier

2015-09-02 Thread Brendan Eich
Andreas Rossberg wrote: On 3 September 2015 at 01:58, Brendan Eich > wrote: I was there, I just re-read and re-remembered. I do not agree with Allen that some tiny needle was uniquely threaded. Rather, an aesthetic preference for the

Re: Global lexical tier

2015-09-02 Thread Allen Wirfs-Brock
On Sep 2, 2015, at 4:58 PM, Brendan Eich wrote: > saam barati wrote: >> Thanks. Reading now. >> >> I'm clearly bad at email :/ > > Naw, this stuff is always harder to find than it should be. > > I was there, I just re-read and re-remembered. I do not agree with Allen that > some tiny needle

Re: Global lexical tier

2015-09-01 Thread Geoffrey Garen
> The possible semantics of global lexical declarations was extensively > explored by TC39 before we make the final design decisions for ES6. The > scoping of global lexical declarations is something we spent many hours > discussing over a span of several years, including: To be fair, some

Re: Global lexical tier

2015-09-01 Thread Allen Wirfs-Brock
On Sep 1, 2015, at 11:04 AM, Geoffrey Garen wrote: >> The possible semantics of global lexical declarations was extensively >> explored by TC39 before we make the final design decisions for ES6. The >> scoping of global lexical declarations is something we spent many hours >> discussing

Re: Global lexical tier

2015-09-01 Thread Jason Orendorff
On Tue, Sep 1, 2015 at 12:03 AM, Allen Wirfs-Brock wrote: > Both the alternative suggest by Jason and the one suggest by Saam were > considered and rejected in these discussions. It's easy to imagine a > different semantics. It's harder to demonstrate that it is a "better > semantics" and to get

Re: Global lexical tier

2015-09-01 Thread Jason Orendorff
On Aug 31, 2015, at 7:11 PM, Brendan Eich wrote: > > We are in rapid-release hell/heaven. > > This means errata can be issued, and engines can implement the better > resolution for those errata, compared to what the last major-version _de > jure_ spec mandated. Yes. Obviously the bar is very,

Re: Global lexical tier

2015-09-01 Thread SaamBarati1
spent > 8 hours today implementing the "global lexical tier", so I think it's helpful to categorize my opinion as being slightly greater than "less useful than a proof that the spec is impossible to implement". Sometimes the best ideas are those that are negligent of &q

Re: Global lexical tier

2015-09-01 Thread Rick Waldron
ns are less > useful than a proof of impossibility when we are people who are both > interested in the JavaScript language and interested in implementing it > well. I've spent > 8 hours today implementing the "global lexical tier", so > I think it's helpful to categorize

Re: Global lexical tier

2015-09-01 Thread saam barati
eople who are both >> interested in the JavaScript language and interested in implementing it >> well. I've spent > 8 hours today implementing the "global lexical tier", so >> I think it's helpful to categorize my opinion as being slightly greater >> than &quo

Re: Global lexical tier

2015-08-31 Thread Brendan Eich
08 PM, Jason Orendorff <jason.orendo...@gmail.com <mailto:jason.orendo...@gmail.com>> wrote: Hi everyone. Can we talk about the global lexical tier? This was a mistake, a real blunder. We all should have known better. An extensible intermediate scope

Re: Global lexical tier

2015-08-31 Thread SaamBarati1
ck-scoped declarations (let, const, >>function, class) not yet supported outside strict mode >>``` >> >> >>- Matthew Robb >> >> On Mon, Aug 31, 2015 at 12:08 PM, Jason Orendorff >><jason.orendo...@gmail.com <mailto:jason.o

Global lexical tier

2015-08-31 Thread Jason Orendorff
Hi everyone. Can we talk about the global lexical tier? This was a mistake, a real blunder. We all should have known better. An extensible intermediate scope implies dynamic scoping. The referent of an identifier can change only once, but it can change. It's like an implicit `with` block around

Re: Global lexical tier

2015-08-31 Thread Matthew Robb
everyone. Can we talk about the global lexical tier? > > This was a mistake, a real blunder. We all should have known better. > An extensible intermediate scope implies dynamic scoping. The referent > of an identifier can change only once, but it can change. It's like an > implicit `with

Re: Global lexical tier

2015-08-31 Thread saam barati
t allowing these to be global properties is better than how it's currently defined.) Saam On Mon, Aug 31, 2015 at 9:08 AM, Jason Orendorff <jason.orendo...@gmail.com> wrote: > Hi everyone. Can we talk about the global lexical tier? > > This was a mistake, a real blunder. We all

Re: Global lexical tier

2015-08-31 Thread Adam Klein
gt; On Mon, Aug 31, 2015 at 12:08 PM, Jason Orendorff < > jason.orendo...@gmail.com> wrote: > >> Hi everyone. Can we talk about the global lexical tier? >> >> This was a mistake, a real blunder. We all should have known better. >> An extensible intermediate scope i

Re: Global lexical tier

2015-08-31 Thread Kevin Smith
> > We should have just made toplevel let/const/class create global > properties, like var. This is how it was proposed originally Can you provide (or link to) a more specific proposal? Kevin ___ es-discuss mailing list es-discuss@mozilla.org

Re: Global lexical tier

2015-08-31 Thread Kevin Smith
> > I don't see how strict/sloppy mode effects the behavior of top-level > lexical declarations. Does the behavior depend on strict mode? > No, V8 just currently disallows the use of let/const/class outside of strict mode. ___ es-discuss mailing list

Re: Global lexical tier

2015-08-31 Thread Allen Wirfs-Brock
On Aug 31, 2015, at 7:11 PM, Brendan Eich wrote: > We are in rapid-release hell/heaven. > > This means errata can be issued, and engines can implement the better > resolution for those errata, compared to what the last major-version _de > jure_ spec mandated. > > Why not? > > /be The