Re: Scoped binding of a method to an object

2013-10-14 Thread Andreas Rossberg
On 13 October 2013 19:49, Brendan Eich bren...@mozilla.com wrote: Erik Arvidsson mailto:erik.arvids...@gmail.com October 13, 2013 10:32 AM We did proposes this back in 2011 http://wiki.ecmascript.org/doku.php?id=strawman:scoped_object_extensions I wasn't at this actual F2F meeting so I

Re: Generic Bundling

2013-10-14 Thread Anne van Kesteren
On Sun, Oct 13, 2013 at 8:30 PM, Brendan Eich bren...@mozilla.com wrote: Anne van Kesteren mailto:ann...@annevk.nl It would require each end point that wants to support this to have new syntax. A solution from http://wiki.whatwg.org/wiki/Zip#URLs will not require updating all the end points.

Re: Generic Bundling

2013-10-14 Thread Brendan Eich
Anne van Kesteren mailto:ann...@annevk.nl October 14, 2013 6:16 AM The idea is to use a somewhat more unique separator, e.g. $sub/. Old browsers would simply fetch the URL from the server and if the server is written with legacy in mind would serve up the file from there. New browsers would

Re: Generic Bundling

2013-10-14 Thread Jorge Chamorro
On 13/10/2013, at 21:34, Brendan Eich wrote: Jorge Chamorro wrote: Are main.js and assets.zip two separate files, or is main.js expected to come from into assets.zip? The latter. I think the latter would be best because it would guarantee that the assets are there by the time

Re: Generic Bundling

2013-10-14 Thread David Bruant
Le 14/10/2013 15:16, Anne van Kesteren a écrit : The idea is to use a somewhat more unique separator, e.g. $sub/. Old browsers would simply fetch the URL from the server and if the server is written with legacy in mind would serve up the file from there. New browsers would realize it's a

Re: Scoped binding of a method to an object

2013-10-14 Thread Brendan Eich
Andreas Rossberg wrote: My take-away was that scoped extension methods are only bearable in a language with a static, nominal class system (like C#), where the additional lookup dimension can be resolved at compile time. Right. The http://scg.unibe.ch/archive/papers/Berg03aClassboxes.pdf

Re: Scoped binding of a method to an object

2013-10-14 Thread Brendan Eich
Till Schneidereit mailto:t...@tillschneidereit.net October 13, 2013 2:39 PM On Sun, Oct 13, 2013 at 8:40 PM, Brendan Eichbren...@mozilla.com wrote: Till Schneidereitmailto:t...@tillschneidereit.net October 13, 2013 11:28 AM And now it causes problem for TC39, browser vendors, sites that use it

Re: Generic Bundling

2013-10-14 Thread Jorge Chamorro
On 14/10/2013, at 17:20, David Bruant wrote: How much are we trying to save with the bundling proposal? 200ms? 300ms? Is it really worth it? I feels like we're trying to solve a first-world problem. I think that the savings depend very much on the latency. For example from where I am to

RE: Generic Bundling

2013-10-14 Thread Andrea Giammarchi
IIRC roundtrip happens once per domain so your math is a bit off. However, I've solved that using a single js Object with all modules packed as strings and parsed at require time once to avoid huge overhead by parsing everything at once. The name is require-client and once gzipped gives similar

Re: How is let compatibility resolved?

2013-10-14 Thread Mathias Bynens
On 2 Oct 2013, at 10:45, Petka Antonov petka_anto...@hotmail.com wrote: In current version, this works just fine: var let = 6; Note that `let` was reserved in strict mode (only) in ES5, meaning that even as per ES5 that snippet only works in sloppy mode.

Re: Generic Bundling

2013-10-14 Thread Andrea Giammarchi
the module, if interested: https://github.com/WebReflection/require_client#require_client Best Regards On Mon, Oct 14, 2013 at 9:47 AM, Andrea Giammarchi andrea.giammar...@gmail.com wrote: IIRC roundtrip happens once per domain so your math is a bit off. However, I've solved that using a

Re: Scoped binding of a method to an object

2013-10-14 Thread John Lenz
Does this performance hit still exist in light of Symbol? It seems you could build lexical extensions on top of it without introducing a performance penalty. On Oct 13, 2013 10:49 AM, Brendan Eich bren...@mozilla.com wrote: Erik Arvidsson

Re: How is let compatibility resolved?

2013-10-14 Thread Allen Wirfs-Brock
On Oct 14, 2013, at 9:49 AM, Mathias Bynens wrote: On 2 Oct 2013, at 10:45, Petka Antonov petka_anto...@hotmail.com wrote: In current version, this works just fine: var let = 6; Note that `let` was reserved in strict mode (only) in ES5, meaning that even as per ES5 that snippet

Re: Scoped binding of a method to an object

2013-10-14 Thread Allen Wirfs-Brock
On Oct 14, 2013, at 8:42 AM, Brendan Eich wrote: Andreas Rossberg wrote: My take-away was that scoped extension methods are only bearable in a language with a static, nominal class system (like C#), where the additional lookup dimension can be resolved at compile time. Right. The

Re: Scoped binding of a method to an object

2013-10-14 Thread Brendan Eich
Allen Wirfs-Brock mailto:al...@wirfs-brock.com October 14, 2013 10:52 AM I'm not sure I buy your Smalltalk has nominal class types assertion, I defer to your Smalltalk expertise :-P. However, there's nothing I know of that allows unrelated class definitions to be related by the subclass

Re: Scoped binding of a method to an object

2013-10-14 Thread Allen Wirfs-Brock
On Oct 14, 2013, at 11:06 AM, Brendan Eich wrote: Allen Wirfs-Brock mailto:al...@wirfs-brock.com October 14, 2013 10:52 AM I'm not sure I buy your Smalltalk has nominal class types assertion, I defer to your Smalltalk expertise :-P. However, there's nothing I know of that allows

Re: Scoped binding of a method to an object

2013-10-14 Thread Brendan Eich
John Lenz mailto:concavel...@gmail.com October 14, 2013 9:59 AM Does this performance hit still exist in light of Symbol? Yes. Symbol is just an alternative property name type. Think of it in pseudo-ML: type PropertyName = String | Symbol where of course practical engines optimize

Re: Scoped binding of a method to an object

2013-10-14 Thread Brendan Eich
Allen Wirfs-Brock mailto:al...@wirfs-brock.com October 14, 2013 11:19 AM You can dynamically change the superclass of a class but that will trigger the recompilation process for that class and its subclasses (implies that superclass to subclass links must be available). This is mostly about

Re: Scoped binding of a method to an object

2013-10-14 Thread Benjamin (Inglor) Gruenbaum
On Mon, Oct 14, 2013 at 6:44 PM, Brendan Eich bren...@mozilla.com wrote: So, see the http://scg.unibe.ch/archive/**papers/Berg03aClassboxes.pdfhttp://scg.unibe.ch/archive/papers/Berg03aClassboxes.pdf work, which inspired Ruby refinements as well as the scoped object extensions strawman, and

Readdition of __proto__

2013-10-14 Thread Benjamin (Inglor) Gruenbaum
Let me start by apologizing for adding noise to the list. I looked for discussion of the standardization of __proto__ in the ES6 spec and couldn't find any. This is probably my shortcoming but I didn't know where to look or how to search the mailing list. I found a lot of threads discussing

Re: Scoped binding of a method to an object

2013-10-14 Thread Russell Leggett
I get that this isn't really the same, but I think one really viable solution for the scoped method problem (which is really just the expression problem, right?) is the proposed bind operator http://wiki.ecmascript.org/doku.php?id=strawman:bind_operator It doesn't use dots, so it won't mask the

Re: Scoped binding of a method to an object

2013-10-14 Thread Brendan Eich
Benjamin (Inglor) Gruenbaum mailto:ing...@gmail.com October 14, 2013 12:37 PM On Mon, Oct 14, 2013 at 6:44 PM, Brendan Eich bren...@mozilla.com mailto:bren...@mozilla.com wrote: So, see the http://scg.unibe.ch/archive/papers/Berg03aClassboxes.pdf work, which inspired Ruby refinements as well

Re: Generic Bundling

2013-10-14 Thread Jorge Chamorro
On 14/10/2013, at 18:47, Andrea Giammarchi wrote: IIRC roundtrip happens once per domain so your math is a bit off. Can you elaborate? I don't quite understand... Thank you, -- ( Jorge )(); ___ es-discuss mailing list es-discuss@mozilla.org

Re: Scoped binding of a method to an object

2013-10-14 Thread Brendan Eich
Russell Leggett mailto:russell.legg...@gmail.com October 14, 2013 12:51 PM I get that this isn't really the same, but I think one really viable solution for the scoped method problem (which is really just the expression problem, right?) The expression problem

Re: Readdition of __proto__

2013-10-14 Thread Brendan Eich
To search es-discuss, I use site:mail.mozilla.org es-discuss as first two terms in a Google search. Sometimes I just use es-discuss. If you add __proto__ you'll find lots to read. Add meeting notes and you'll find recorded TC39 decisions. I usually find links and include them here to avoid

Re: Scoped binding of a method to an object

2013-10-14 Thread Benjamin (Inglor) Gruenbaum
I think I had a problem articulating my thoughts in this last one. I was trying *not* to tie my cart in front of the horse. Even before worrying about implementer performance issues which sound important I wanted to know if: The problem I had was a real problem to other developers too and it was

Re: Generic Bundling

2013-10-14 Thread David Bruant
Le 14/10/2013 18:21, Jorge Chamorro a écrit : On 14/10/2013, at 17:20, David Bruant wrote: How much are we trying to save with the bundling proposal? 200ms? 300ms? Is it really worth it? I feels like we're trying to solve a first-world problem. I think that the savings depend very much on

Re: Readdition of __proto__

2013-10-14 Thread Benjamin (Inglor) Gruenbaum
Thanks. Found a bunch of interesting things. Hopefully I'll find some use case where it doesn't completely break the beautiful OOP behavioral typing gives us when we play nice with it (Yep, that dog of yours, he's no longer an animal) :) On Mon, Oct 14, 2013 at 11:10 PM, Brendan Eich

Re: Readdition of __proto__

2013-10-14 Thread Andrea Giammarchi
Yes, it's hard to search in this mailing list but luckily not everyone in here will tell you not to be that guy that clearly didn't read anything and is just annoying ^_^ Since I've personally pushed to drop `__proto__` I might be the right person to give you pros and cons. Feel free to ask me

Re: Readdition of __proto__

2013-10-14 Thread Andrea Giammarchi
On Mon, Oct 14, 2013 at 1:15 PM, Andrea Giammarchi andrea.giammar...@gmail.com wrote: Yes, it's hard to search in this mailing list but luckily not everyone in here will tell you not to be that guy that clearly didn't read anything and is just annoying ^_^ Brendan, since you participated,

Re: Readdition of __proto__

2013-10-14 Thread Brendan Eich
Andrea Giammarchi wrote: __Current Status__ (Thanks for the dunders! :-P) Instead of formalizing its form, ES6 accepted `Object.setPrototypeOf` as described in specs and decided to silently move beside, but still have in specs, the dunder `__proto__` form, fixing at least a couple of

Re: Readdition of __proto__

2013-10-14 Thread Benjamin (Inglor) Gruenbaum
__Thanks__ ! This is really above and beyond what I could have asked for. I really wish there was an easy way to search the list like tags. I've been reading for a while but when I want to bring up, learn more about or discuss things - not being able to search really sucks. It makes me want to

Re: Readdition of __proto__

2013-10-14 Thread Brendan Eich
Andrea Giammarchi mailto:andrea.giammar...@gmail.com October 14, 2013 1:32 PM I meant that IIRC `obj[__proto__]` should not invoke that Annex B specified getter (@Benjamin, Annex B is where you'll find everything related indeed) but `obj.__proto__` will ... unless once again I've missed some

Re: Readdition of __proto__

2013-10-14 Thread Andrea Giammarchi
You are breaking an opened door with me and I've indeed pushed to **not** have `__dunder__` specd but, for how much remote anger I still have against some decision some famous library and its main author made few months ago ... * web developers and specially library authors are usually more

Re: Readdition of __proto__

2013-10-14 Thread Andrea Giammarchi
Then I might have confused what decided with `JSON` serialization where `__proto__` will be a property and not a setter, neither a getter once deserialized. Is this correct? Yeah, I remember that different accessors looked weird to me too ... thanks for clarification. Best Regards On Mon, Oct

RE: Readdition of __proto__

2013-10-14 Thread Domenic Denicola
From: es-discuss [es-discuss-boun...@mozilla.org] on behalf of Brendan Eich [bren...@mozilla.com] Our duty as a standards body includes specifying de-facto standards which browsers must implement to interop. __proto__ is one such. It's worth highlighting this aspect of the situation. This

Re: Readdition of __proto__

2013-10-14 Thread Andrea Giammarchi
`JSON` serialization = `JSON` parse On Mon, Oct 14, 2013 at 1:53 PM, Andrea Giammarchi andrea.giammar...@gmail.com wrote: Then I might have confused what decided with `JSON` serialization where `__proto__` will be a property and not a setter, neither a getter once deserialized. Is this

Re: Readdition of __proto__

2013-10-14 Thread Mark S. Miller
From https://docs.google.com/a/google.com/file/d/0BxVCLS4f8Sg5NWZmM2NjZWEtYmExMS00Y2EzLWE3ZTMtNzFmYjYwYzBiOTIw/edit?hl=en_US, apparently in 1988: The Committee’s overall goal was to develop a clear, consistent, and unambiguous Standard for the C programming language which codifies the common,

Re: Scoped binding of a method to an object

2013-10-14 Thread Russell Leggett
On Mon, Oct 14, 2013 at 4:05 PM, Brendan Eich bren...@mozilla.com wrote: Russell Leggett mailto:russell.leggett@gmail.**comrussell.legg...@gmail.com October 14, 2013 12:51 PM I get that this isn't really the same, but I think one really viable solution for the scoped method problem (which

Re: Scoped binding of a method to an object

2013-10-14 Thread Brendan Eich
Russell Leggett mailto:russell.legg...@gmail.com October 14, 2013 2:07 PM On Mon, Oct 14, 2013 at 4:05 PM, Brendan Eich bren...@mozilla.com mailto:bren...@mozilla.com wrote: Russell Leggett mailto:russell.legg...@gmail.com mailto:russell.legg...@gmail.com October 14,

Re: Readdition of __proto__

2013-10-14 Thread Rick Waldron
On Mon, Oct 14, 2013 at 4:47 PM, Brendan Eich bren...@mozilla.com wrote: Benjamin (Inglor) Gruenbaum mailto:ing...@gmail.com October 14, 2013 1:33 PM __Thanks__ ! This is really above and beyond what I could have asked for. Beware that what Andreas wrote about __proto__ in ES6 was not

Re: Generic Bundling

2013-10-14 Thread Jorge Chamorro
On 14/10/2013, at 22:11, David Bruant wrote: You already can with inlining, can't you? Yes and no: -It's much more complicated than pre zipping a bunch of files and adding a ref attribute. -It requires additional logic at the server side, and more programming. -It's not trivial always: often

Re: Making the identifier identification strawman less restrictive

2013-10-14 Thread Erik Arvidsson
I'm concerned about the latest version of this on the wiki. The edition parameter requires that we ship 2 tables today. This seems like it might change to 3 in ES7 and n in ES(n+4). I think the only reasonable requirement is that it matches what the engine actually uses. For tools it seems better

Re: Generic Bundling

2013-10-14 Thread Jorge Chamorro
On 14/10/2013, at 22:27, Andrea Giammarchi wrote: AFAIK you have those 500ms delay per roundtrip, as you said, but not per domain. I am talking about mobile and radio behavior where fetching from multiple sources will result in a roundtrip mess/hell but fetching all resources from a

Re: Readdition of __proto__

2013-10-14 Thread Brendan Eich
Rick Waldron wrote: Do you mean more then inclusion in Annex B? http://people.mozilla.org/~jorendorff/es6-draft.html#sec-other-additional-features http://people.mozilla.org/%7Ejorendorff/es6-draft.html#sec-other-additional-features The committee and community made the right move to go with

Re: Making the identifier identification strawman less restrictive

2013-10-14 Thread Brendan Eich
Erik Arvidsson wrote: I'm concerned about the latest version of this on the wiki. The edition parameter requires that we ship 2 tablestoday. This seems like it might change to 3 in ES7 and n in ES(n+4). I think the only reasonable requirement is that it matches what the engine actually uses.

Re: Generic Bundling

2013-10-14 Thread Brendan Eich
Jorge Chamorro wrote: The only work around for that is making as few requests as possible. +∞, +§, and beyond. This is deeply true, and a hot topic with browser/network-stack engineers right now. /be ___ es-discuss mailing list

Re: Readdition of __proto__

2013-10-14 Thread Brendan Eich
I think you may have mixed up a few things: 1. JSON does not recognize '__proto__' per its unchanging spec, and so parsing that identifier makes an own data property. 2. var obj = {__proto__: proto}; is a special form, unlike any other identifier __proto__ as the literal property name does

Re: Generic Bundling

2013-10-14 Thread Russell Leggett
This is probably the wrong place to ask the question, but I was just thinking about the whole HTTP 2 server push thing. In a way, it surely wins in the # of requests camp if it works as described - you request index.html and the server intelligently starts pushing you not only index.html, but also

Re: Generic Bundling

2013-10-14 Thread Jorge Chamorro
On 14/10/2013, at 22:11, David Bruant wrote: You already can with inlining, can't you? It would also be very interesting to know if you had .zip packing, would you be inlining? -- ( Jorge )(); ___ es-discuss mailing list es-discuss@mozilla.org

Re: Generic Bundling

2013-10-14 Thread Andrea Giammarchi
Inline, from the Moon On Mon, Oct 14, 2013 at 2:22 PM, Jorge Chamorro jo...@jorgechamorro.comwrote: What I meant with round-trip latency is: once the connection has been established I was talking about this latency, those 500ms in my example , a network packet takes almost 250 ms to go

Re: Readdition of __proto__

2013-10-14 Thread Rick Waldron
On Mon, Oct 14, 2013 at 5:22 PM, Brendan Eich bren...@mozilla.com wrote: Rick Waldron wrote: Do you mean more then inclusion in Annex B? http://people.mozilla.org/~**

Re: Readdition of __proto__

2013-10-14 Thread Andrea Giammarchi
Allen my confusion is with o4 ... what happens once you re-set/assign its `__proto__` there? Is it just a normal property so new value will be set ? Is it a magic inherited thing (it shouldn't) that will change the o4 prototype chain ? On Mon, Oct 14, 2013 at 5:32 PM, Allen Wirfs-Brock

Re: Scoped binding of a method to an object

2013-10-14 Thread Allen Wirfs-Brock
On Oct 14, 2013, at 3:58 PM, Brendan Eich wrote: Russell Leggett wrote: It doesn't use dots, so it won't mask the difference between the normal prototype chain with some additional scoped binding (for good or ill), but along with it comes the clarity and comfort of lexical binding and also

Re: Readdition of __proto__

2013-10-14 Thread Allen Wirfs-Brock
On Oct 14, 2013, at 5:54 PM, Andrea Giammarchi wrote: Allen my confusion is with o4 ... what happens once you re-set/assign its `__proto__` there? Is it just a normal property so new value will be set ? Is it a magic inherited thing (it shouldn't) that will change the o4 prototype chain

Re: Readdition of __proto__

2013-10-14 Thread Andrea Giammarchi
we are lucky enough there's no browser without a native JSON object that uses the D. Crockford polyfill ^_^ On Mon, Oct 14, 2013 at 6:20 PM, Allen Wirfs-Brock al...@wirfs-brock.comwrote: On Oct 14, 2013, at 5:54 PM, Andrea Giammarchi wrote: Allen my confusion is with o4 ... what happens once

Re: Readdition of __proto__

2013-10-14 Thread Andrea Giammarchi
(early sent) I meant passing through the prototype. The unmagic behavior is when you deal with such object thinking accessing its `__proto__` will behave like others. So it's the other way round but again, I know all of this, I was just confused by it and explained indeed with an example code how