Re: Weak Graph

2015-11-06 Thread Steve Fink
On 11/04/2015 08:09 AM, Jussi Kalliokoski wrote: It provides the needed interface and the unused child revisions get cleaned up properly. However: * This is a complete nightmare for GC performance because of cyclical weak references. Not necessarily. Current Spidermonkey should handle it

RE: RegExp free-spacing & comments

2015-11-06 Thread Gorkem Yakin
I don’t know about other engines, but Chakra does cache the RegExp matcher when the RegExp object is created via the constructor. Gorkem From: es-discuss [mailto:es-discuss-boun...@mozilla.org] On Behalf Of Isiah Meadows Sent: Friday, November 6, 2015 4:36 PM To: C. Scott Ananian

Re: RegExp free-spacing & comments

2015-11-06 Thread Isiah Meadows
The problem with using the RegExp constructor is that it is never cached by the engine. As a literal, engines usually internalize them, speeding up matches very quickly. On Fri, Nov 6, 2015, 14:24 C. Scott Ananian wrote: > On Fri, Nov 6, 2015 at 1:20 PM, Brian Terlson >

Re: RegExp free-spacing & comments

2015-11-06 Thread Isiah Meadows
Does it still read the string? On Fri, Nov 6, 2015, 20:59 Gorkem Yakin wrote: > I don’t know about other engines, but Chakra does cache the RegExp matcher > when the RegExp object is created via the constructor. > > > > Gorkem > > > > *From:* es-discuss

RegExp free-spacing & comments

2015-11-06 Thread Brian Terlson
While looking in to proposals for look-behinds and named capture groups for ECMAScript RegExps, I thought I'd also think about other oft-requested features we currently lack: free-spacing and comments. Comments allow a programmer to embed comments inside the regexp literal. Free-spacing tells

Re: RegExp free-spacing & comments

2015-11-06 Thread C. Scott Ananian
On Fri, Nov 6, 2015 at 1:20 PM, Brian Terlson wrote: > RegExp.re or similar seems nice: > > ``` > let re = RegExp.re("x")` > (\d{3}-)? # area code (optional) > \d{3}-# prefix > \d{4} # line number > `; > ``` > > But it seems like previous proposals

Re: Weak Graph

2015-11-06 Thread Jason Orendorff
On Wed, Nov 4, 2015 at 10:09 AM, Jussi Kalliokoski wrote: > I'm trying to come up with a solution to the problem of rendering lists [...] > My idea for a solution is that the lists are immutable, contain a reference > to their parent and a changeset / diff compared to

Re: RegExp free-spacing & comments

2015-11-06 Thread Caitlin Potter
(Repost from IRC discussion) Could do something like this: ```javascript let re = /``` (\d{3}-)?# area code (opt) \d{3}-# exchange \d{4} # line number ```/; ``` It looks sort of heredoc-ish, which is nice, and it shouldn’t break existing parsing rules.

Re: RegExp free-spacing & comments

2015-11-06 Thread C. Scott Ananian
We have a template string mechanism, and it allows linefeeds. Let's use that, instead of inventing new heredoc syntax. --scott ___ es-discuss mailing list es-discuss@mozilla.org https://mail.mozilla.org/listinfo/es-discuss

Re: RegExp free-spacing & comments

2015-11-06 Thread C. Scott Ananian
If you're using string templates, why not do the full regex there, instead of just passing the result to `new RegExp`? See https://esdiscuss.org/topic/regexp-escape#content-22 and https://esdiscuss.org/topic/regexp-escape#content-28 for some examples, and

RE: RegExp free-spacing & comments

2015-11-06 Thread Brian Terlson
RegExp.re or similar seems nice: ``` let re = RegExp.re("x")` (\d{3}-)? # area code (optional) \d{3}-# prefix \d{4} # line number `; ``` But it seems like previous proposals of this want escaping which doesn't seem ideal for this purpose. Do we need both `RegExp.re` and

Re: Status of Chrome Proxy in face of Object.observe removal

2015-11-06 Thread Andreas Rossberg
On 6 November 2015 at 19:16, Simon Blackwell wrote: > In the face of the announcment that the Object.observe standard proposal is > being revoked and commentary that seems to indicate that at a minimum either > Proxy or Object.observe is needed, does anyone know the