Re: length property value for functions with parameter enhancements

2011-08-29 Thread Allen Wirfs-Brock
It looks like that in a number of these cases, what is being tested is the number of declared arguments to the jquery Sizzle function which is a module function for its selector engine. Very early versions of Sizzle seem to have had 3 formals (https://github.com/jquery/sizzle/commit/51ba62312

Re: length property value for functions with parameter enhancements

2011-08-29 Thread Brendan Eich
Here's a log with complete decompilation including the function whose .length was accessed. file:line length function /be funlen.log Description: Binary data ___ es-discuss mailing list es-discuss@mozilla.org https://mail.mozilla.org/listinfo/es-

Re: length property value for functions with parameter enhancements

2011-08-29 Thread Brendan Eich
On Aug 29, 2011, at 4:38 PM, Allen Wirfs-Brock wrote: > 2) the number of parameter positions (including the rest parameter if > specified) that precede the first default-value parameter (or the end of the > list if there are no default-value parameters): > function (a,b,c) {} //length==3 > fu

Re: length property value for functions with parameter enhancements

2011-08-29 Thread Allen Wirfs-Brock
On Aug 29, 2011, at 1:36 PM, Brendan Eich wrote: > > You can't use one integer-valued property to convey two meanings. F.length is > either minimum non-default/rest parameters, or a count of non-rest > parameters. I don't see a sane alternative. The count of non-rest parameters > is not that

Re: double checking if window.eval(…) is an indirect call to eval().

2011-08-29 Thread Brendan Eich
On Aug 27, 2011, at 3:06 PM, Oliver Hunt wrote: > On Aug 27, 2011, at 2:42 PM, Dmitry Soshnikov wrote: > >> On Sat, Aug 27, 2011 at 11:53 PM, John-David Dalton >> wrote: >> > No. It's the global object what is the base (more precisely, its DOM's >> > proxy wrapper -- `window` or either the glo

Re: length property value for functions with parameter enhancements

2011-08-29 Thread Brendan Eich
On Aug 29, 2011, at 11:29 AM, Allen Wirfs-Brock wrote: >> Hm, that doesn't sound like a very JavaScripty argument :). If you buy >> into optional arguments at all, then I can certainly envision valid >> use cases for combining them with rest arguments. > > Which is the source of the potential con

Re: length property value for functions with parameter enhancements

2011-08-29 Thread Brendan Eich
On Aug 28, 2011, at 4:36 PM, Allen Wirfs-Brock wrote: > On Aug 27, 2011, at 6:12 AM, Andreas Rossberg wrote: > >> On 27 August 2011 00:34, Allen Wirfs-Brock wrote: >>> If the formal parameter list includes any non-optional, non-rest formal >>> parameters, the length is the total number of non-op

Re: length property value for functions with parameter enhancements

2011-08-29 Thread Allen Wirfs-Brock
On Aug 29, 2011, at 2:32 AM, Andreas Rossberg wrote: > On 29 August 2011 01:36, Allen Wirfs-Brock wrote: >> On Aug 27, 2011, at 6:12 AM, Andreas Rossberg wrote: >>> True, and actually, there are more issues with length & function >>> proxies. I don't have my notes with me right now, but for exam

Re: Function proxy length (Was: length property value for functions with parameter enhancements)

2011-08-29 Thread Allen Wirfs-Brock
On Aug 29, 2011, at 7:43 AM, Tom Van Cutsem wrote: > (changed subject to fork off discussion on function proxies) > > 2011/8/29 Allen Wirfs-Brock > On Aug 27, 2011, at 6:12 AM, Andreas Rossberg wrote: > > True, and actually, there are more issues with length & function > > proxies. I don't hav

Re: Function proxy length (Was: length property value for functions with parameter enhancements)

2011-08-29 Thread Mark S. Miller
On Mon, Aug 29, 2011 at 7:43 AM, Tom Van Cutsem wrote: > (changed subject to fork off discussion on function proxies) > > 2011/8/29 Allen Wirfs-Brock > >> On Aug 27, 2011, at 6:12 AM, Andreas Rossberg wrote: >> > True, and actually, there are more issues with length & function >> > proxies. I d

Function proxy length (Was: length property value for functions with parameter enhancements)

2011-08-29 Thread Tom Van Cutsem
(changed subject to fork off discussion on function proxies) 2011/8/29 Allen Wirfs-Brock > On Aug 27, 2011, at 6:12 AM, Andreas Rossberg wrote: > > True, and actually, there are more issues with length & function > > proxies. I don't have my notes with me right now, but for example, it > > is n

Re: length property value for functions with parameter enhancements

2011-08-29 Thread Andreas Rossberg
On 29 August 2011 01:36, Allen Wirfs-Brock wrote: > On Aug 27, 2011, at 6:12 AM, Andreas Rossberg wrote: >> True, and actually, there are more issues with length & function >> proxies. I don't have my notes with me right now, but for example, it >> is not clear at all what length Function.prototyp