Re: July 26, 2012 TC39 Meeting Notes

2012-08-03 Thread Tom Van Cutsem
Thanks for clarifying the Racket design, Sam. I like the proposed refactoring where David's proposed isPrivateNameKnown property essentially becomes an extra argument to the Proxy constructor (let's call it the name whitelist). I do agree with David on two points: - if a name isn't on the name

Re: Template strings and templates

2012-08-03 Thread Claus Reinke
let tmpl = html` table $for address in addresses ${ html`tr${first}/trtr${last}/tr` } /table`; let tmpl = addresses = html` table ${addresses.forEach(address= html`tr${address.first}/trtr${address.last}/tr` ).join('\n') } /table`

Re: What’s the best name for keyword parameters?

2012-08-03 Thread Alex Russell
There is a long history of TC39 naming things for internal use and those names never escaping to the common lexicon. I'm not sure it's a thing we need to (or even should) weigh in on via the spec. On Aug 3, 2012, at 6:55 AM, Axel Rauschmayer a...@rauschma.de wrote: We don't have a proposal

Re: July 26, 2012 TC39 Meeting Notes

2012-08-03 Thread David Bruant
Le 03/08/2012 04:03, Tom Van Cutsem a écrit : Thanks for clarifying the Racket design, Sam. I like the proposed refactoring where David's proposed isPrivateNameKnown property essentially becomes an extra argument to the Proxy constructor (let's call it the name whitelist). (... until we call

Re: Template strings and templates

2012-08-03 Thread Mark S. Miller
On Fri, Aug 3, 2012 at 1:25 AM, Claus Reinke claus.rei...@talk21.com wrote: let tmpl = html` table $for address in addresses ${ html`tr${first}/trtr${last}/tr` } /table`; let tmpl = addresses = html` table ${addresses.forEach(address=

Re: Template strings and templates

2012-08-03 Thread Allen Wirfs-Brock
On Aug 2, 2012, at 12:02 PM, Axel Rauschmayer wrote: I love the new name “template strings” for “quasi literals”. Only “tag” seem inferior to “quasi handler”, because that former term is already used in HTML. I didn't intentionally rename quasi handler to tag. I titled the section of the

Re: (Mostly) blocked from es-discuss

2012-08-03 Thread Allen Wirfs-Brock
Dont know whether this helps, but I've founds that sometimes posts I send through a particular smtp server (mailhop's) get blocked and/or delayed. Not at the server but upstream from it. Going through a different smtp server on a different network always seems to get the message through.

Moving String.prototype.substr to normative part of the spec

2012-08-03 Thread David Bruant
Hi, A code joke from a colleague [1] revealed [2] that String.prototype.substr is not part of ES5.1 as normative. Kangax tables indicate that this property is in all modern browsers [3]. I think it'd be worth moving this method to the normative part of the spec and that tests be added to

Re: Moving String.prototype.substr to normative part of the spec

2012-08-03 Thread Axel Rauschmayer
Really necessary – given that slice is a perfect replacement? On Aug 3, 2012, at 18:24 , David Bruant bruan...@gmail.com wrote: Hi, A code joke from a colleague [1] revealed [2] that String.prototype.substr is not part of ES5.1 as normative. Kangax tables indicate that this property is in

Re: Moving String.prototype.substr to normative part of the spec

2012-08-03 Thread Brendan Eich
History: substring was in JS 1.0 in 1995, based on JDK 1.0 java.lang.String.substring -- including the quirk that misordered begin and end are swapped! I recall adding substr at the start too, based on Perl. I added slice based on Python in JS 1.2 in 1997, which fed into ES3. So,

Re: Moving String.prototype.substr to normative part of the spec

2012-08-03 Thread Allen Wirfs-Brock
substr is in Annex B, which in ES5.1 is an informative annex. In ES6, the content of Annex B will be optional normative. Required for web user agents, but optional for other hosts. Allen On Aug 3, 2012, at 9:24 AM, David Bruant wrote: Hi, A code joke from a colleague [1] revealed [2]

Re: Internationalization: Issues with upgrading to UTS 35 version 21

2012-08-03 Thread Norbert Lindenberg
For the core BCP 47 (language, script, country), letting applications choose what to support makes sense and is how the Internationalization spec is written. For the Unicode locale extension, however, we have to be more selective. The Unicode locale extension has - keys that should be fully

Re: Moving String.prototype.substr to normative part of the spec

2012-08-03 Thread David Bruant
Le 03/08/2012 12:46, Rick Waldron a écrit : On Friday, August 3, 2012 at 12:24 PM, David Bruant wrote: Hi, A code joke from a colleague [1] revealed [2] that String.prototype.substr is not part of ES5.1 as normative. Kangax tables indicate that this property is in all modern browsers [3]. I

Re: Template strings and templates

2012-08-03 Thread Axel Rauschmayer
let tmpl = addresses = html` table ${addresses.forEach(address= html`tr${address.first}/trtr${address.last}/tr` ).join('\n') } /table` would be my guess? Similarly for the localization example in the blog post: arrow functions should make it relatively painless

Re: Moving String.prototype.substr to normative part of the spec

2012-08-03 Thread David Bruant
Le 03/08/2012 12:58, Allen Wirfs-Brock a écrit : substr is in Annex B, which in ES5.1 is an informative annex. In ES6, the content of Annex B will be optional normative. Required for web user agents, but optional for other hosts. Ok. Is it planned to extend ES6-test262 scope to include

Re: Template strings and templates

2012-08-03 Thread Claus Reinke
let tmpl = addresses = html` table ${addresses.forEach(address= html`tr${address.first}/trtr${address.last}/tr` ).join('\n') } /table` Yes. But you need to say .map( rather than .forEach( above. See http://wiki.ecmascript.org/doku.php?id=harmony:quasis#nesting.

On revoking access to the target of a proxy

2012-08-03 Thread David Bruant
Hi, I spent a couple of hours presenting proxies to a couple of folks at the IDRC (Inclusive Design Research Center) in Toronto and Colin Clark (IDRC Tech Lead) made me realize that we have lost something between the previous proxy design and the current one. This is related to the caretaker

Re: On revoking access to the target of a proxy

2012-08-03 Thread Sam Tobin-Hochstadt
On Fri, Aug 3, 2012 at 5:03 PM, David Bruant bruan...@gmail.com wrote: With the current design, there is no way to cut the access to the target and enable its garbage collection because the target is an internal property of the proxy. It means that malicious or buggy code keeping a reference

Re: On revoking access to the target of a proxy

2012-08-03 Thread David Bruant
Le 03/08/2012 17:08, Sam Tobin-Hochstadt a écrit : On Fri, Aug 3, 2012 at 5:03 PM, David Bruant bruan...@gmail.com wrote: With the current design, there is no way to cut the access to the target and enable its garbage collection because the target is an internal property of the proxy. It means

Internationalization: null as options property

2012-08-03 Thread Norbert Lindenberg
A null value in a property of the options arguments in the ECMAScript Internationalization API is currently special-cased and treated as if it were undefined, leading to default values to be applied. This probably crept in based on examples in some libraries that treat any falsy value in

Re: On revoking access to the target of a proxy

2012-08-03 Thread Sam Tobin-Hochstadt
On Fri, Aug 3, 2012 at 5:12 PM, David Bruant bruan...@gmail.com wrote: Le 03/08/2012 17:08, Sam Tobin-Hochstadt a écrit : On Fri, Aug 3, 2012 at 5:03 PM, David Bruant bruan...@gmail.com wrote: With the current design, there is no way to cut the access to the target and enable its garbage

Re: Template strings and templates

2012-08-03 Thread Allen Wirfs-Brock
On Aug 3, 2012, at 1:08 PM, Claus Reinke wrote: Btw, the negative experience with Haskell's monads terminology shows that choosing a scary name can hamper the adoption of even the most useful language features. So switching to template strings is a good idea. We do need to communicate

Autobinding destructuring

2012-08-03 Thread David Bruant
Hi, I wrote some code today: var cos = Math.cos, sin = Math.sin, PI = Math.PI; // later: x1 = x + R*cos(t)*cos(angle) - r*sin(t)*sin(angle); First of all, it made me realize that the usual example of 'with' (using with(Math) and an expression like I showed) turn

Re: On revoking access to the target of a proxy

2012-08-03 Thread David Bruant
Le 03/08/2012 17:38, Sam Tobin-Hochstadt a écrit : On Fri, Aug 3, 2012 at 5:12 PM, David Bruant bruan...@gmail.com wrote: Le 03/08/2012 17:08, Sam Tobin-Hochstadt a écrit : On Fri, Aug 3, 2012 at 5:03 PM, David Bruant bruan...@gmail.com wrote: With the current design, there is no way to cut

Re: July 26, 2012 TC39 Meeting Notes

2012-08-03 Thread Brendan Eich
I think I buy this *if* we spec WeakSet and require it (and only it, not a trickster impersonator) as the optional third argument. And of course it's a live set. Alternative: take any arraylike and treat it as a descriptor, not live, whose elements are copied into an internal weak set. Your

Re: July 26, 2012 TC39 Meeting Notes

2012-08-03 Thread David Bruant
Le 03/08/2012 20:03, Brendan Eich a écrit : I think I buy this *if* we spec WeakSet and require it (and only it, not a trickster impersonator) as the optional third argument. And of course it's a live set. Alternative: take any arraylike and treat it as a descriptor, not live, whose elements

Re: On revoking access to the target of a proxy

2012-08-03 Thread David Bruant
Le 03/08/2012 19:54, Brendan Eich a écrit : David Bruant wrote: So your actual target can be GC'ed, but the dummyTarget has to keep observed non-configurable (and non-writable) properties. Or you can give up non-configurability. I don't find any of these solutions satisfactory. Please see

Re: Template strings and templates

2012-08-03 Thread Axel Rauschmayer
Not sure that something better than “template string” exists. It would have to be something that describes the construct well: It is an interesting hybrid between a literal (such as a regular expression) and a function call. On Aug 3, 2012, at 23:38 , Allen Wirfs-Brock al...@wirfs-brock.com

Re: Template strings and templates

2012-08-03 Thread Axel Rauschmayer
Ah, OK. Spitballing: A synonym of tag then, maybe? Alas, label is out. If the term was, say, “mark” then one could conceivably say “mark function” instead of handler. On Aug 3, 2012, at 17:52 , Allen Wirfs-Brock al...@wirfs-brock.com wrote: Only “tag” seem inferior to “quasi handler”,