Re: Comments on Sept Meeting Notes

2013-09-28 Thread Brendan Eich
Kevin Smith mailto:zenpars...@gmail.com September 27, 2013 9:44 PM All the noise we made about Object.extend was unclear? From jQuery: https://github.com/jquery/jquery/blob/master/src/core.js#L157 Many similar functions, going back to Prototype's Object.extend: Object.extend

Re: Comments on Sept Meeting Notes

2013-09-28 Thread Brendan Eich
Kevin Smith mailto:zenpars...@gmail.com September 27, 2013 9:56 PM div id=@iterator/div scriptalert(document.getElementsByTagName(div)[@iterator])/script This is a good point, and one which I was trying to reason about (way) upthread. This might do it - have to sleep on it, though...

Re: Comments on Sept Meeting Notes

2013-09-28 Thread Allen Wirfs-Brock
On Sep 27, 2013, at 9:44 PM, Kevin Smith wrote: All the noise we made about Object.extend was unclear? From jQuery: https://github.com/jquery/jquery/blob/master/src/core.js#L157 Many similar functions, going back to Prototype's Object.extend: Object.extend = function(destination,

Re: Comments on Sept Meeting Notes

2013-09-28 Thread Kevin Smith
I took Anne's cheeky lack of quotes around the div's id attribute to be just good HTML minimal style :-P. No extension there. In other words, I thought this was an argument against using @iterator to name the unstratified iteration protocol trap. Yes, it is - and it *might* be the

Add regular expressions lookbehind

2013-09-28 Thread Sebastian Zartner
I wonder if the discussion about lookbehinds[1] and Marc Harter's proposal for them[2] in the past led to anything. I'd really like to see these implemented in ECMAScript specification and it seems I am not the only one.[3][4][5] This even caused people to try to mimic them.[6] So I wanted to pick

Pass an environment to eval()?

2013-09-28 Thread Axel Rauschmayer
Has this feature ever been considered? For example: ``` $ var env = { __proto__: window, foo: 1 }; $ eval('var bar = foo+1', env); $ env.bar 2 ``` Useful for writing interpreters and more convenient for interacting with evaluated code than improvising something equivalent via `Function`. Axel

Re: Pass an environment to eval()?

2013-09-28 Thread Brendan Eich
Axel Rauschmayer mailto:a...@rauschma.de September 28, 2013 2:49 PM Has this feature ever been considered? Lots of times, going back at least as far as http://wiki.ecmascript.org/doku.php?id=discussion:resurrected_eval Read under Resolved issues. SpiderMonkey had a two-argument eval for

Re: Pass an environment to eval()?

2013-09-28 Thread Mark S. Miller
On Sat, Sep 28, 2013 at 2:49 PM, Axel Rauschmayer a...@rauschma.de wrote: Has this feature ever been considered? For example: ``` $ var env = { __proto__: window, foo: 1 }; $ eval('var bar = foo+1', env); $ env.bar 2 ``` See the confine function at

Re: Pass an environment to eval()?

2013-09-28 Thread Mark S. Miller
Actually, for this, confine isn't quite what you want, since you're providing the entire extensible virtual global. (The confine function's second argument is just the additions to the default powerless virtual global.) You want compileExpr from

Re: Comments on Sept Meeting Notes

2013-09-28 Thread Kevin Smith
Anne, Would you agree that HTMLCollection is an inherently future-hostile API? That is, it is impossible to add *any* methods or properties to the API without potentially breaking compatibility? { Kevin } ___ es-discuss mailing list