Re: Uninteresting parameters

2011-09-29 Thread Dean Landolt
On Thu, Sep 29, 2011 at 12:13 AM, Rick Waldron waldron.r...@gmail.comwrote: On Thu, Sep 29, 2011 at 12:09 AM, Rick Waldron waldron.r...@gmail.comwrote: On Wed, Sep 28, 2011 at 11:05 PM, Dean Landolt d...@deanlandolt.comwrote: On Wed, Sep 28, 2011 at 10:06 PM, Mike Shaver

Re: Uninteresting parameters

2011-09-29 Thread Allen Wirfs-Brock
On Sep 29, 2011, at 6:04 AM, Dean Landolt wrote: On Thu, Sep 29, 2011 at 12:13 AM, Rick Waldron waldron.r...@gmail.com wrote: On Thu, Sep 29, 2011 at 12:09 AM, Rick Waldron waldron.r...@gmail.com wrote: On Wed, Sep 28, 2011 at 11:05 PM, Dean Landolt d...@deanlandolt.com wrote:

Re: Uninteresting parameters

2011-09-29 Thread Dean Landolt
On Thu, Sep 29, 2011 at 1:03 PM, Allen Wirfs-Brock al...@wirfs-brock.comwrote: On Sep 29, 2011, at 6:04 AM, Dean Landolt wrote: On Thu, Sep 29, 2011 at 12:13 AM, Rick Waldron waldron.r...@gmail.comwrote: On Thu, Sep 29, 2011 at 12:09 AM, Rick Waldron waldron.r...@gmail.comwrote: On

Re: Uninteresting parameters

2011-09-28 Thread Dean Landolt
On Wed, Sep 28, 2011 at 12:52 AM, Brendan Eich bren...@mozilla.com wrote: On Sep 27, 2011, at 4:02 PM, Dean Landolt wrote: On Tue, Sep 27, 2011 at 4:57 PM, Brendan Eich bren...@mozilla.com wrote: On Sep 27, 2011, at 1:21 PM, Dean Landolt wrote: Out of curiosity is there any reason to keep

Re: Uninteresting parameters

2011-09-28 Thread Brendan Eich
On Sep 28, 2011, at 11:21 AM, Dean Landolt wrote: Hmm, I think I see what you mean, but the hole case is different enough and anyway it has been in the language for 12 years. True enough, but wouldn't you say it's still commonly misunderstood? I don't hear enough about hole literal

Re: Uninteresting parameters

2011-09-28 Thread Dean Landolt
On Wed, Sep 28, 2011 at 2:50 PM, Brendan Eich bren...@mozilla.com wrote: On Sep 28, 2011, at 11:21 AM, Dean Landolt wrote: Hmm, I think I see what you mean, but the hole case is different enough and anyway it has been in the language for 12 years. True enough, but wouldn't you say it's

Re: Uninteresting parameters

2011-09-28 Thread Brendan Eich
On Sep 28, 2011, at 1:53 PM, Dean Landolt wrote: Same here, but in comma-first it's not always adjacent: var middleware = [ context, , csrf , xsite , head , considtional , error ]

Re: Uninteresting parameters

2011-09-28 Thread Mike Shaver
On Wed, Sep 28, 2011 at 2:50 PM, Brendan Eich bren...@mozilla.com wrote: I agree holes need better handling in future arraylike extras. Design effort there can start now, using today's JS. I'd welcome it. Perhaps underscore does well already? IIRC I chose the hole behaviour in the ES5 array

Re: Uninteresting parameters

2011-09-28 Thread Mike Shaver
On Wed, Sep 28, 2011 at 9:11 PM, Brendan Eich bren...@mozilla.com wrote: No worries, array extras are a great addition, we just need to keep rolling. Oh, no offense taken. I just meant to say that there may be consistency-with-existing-pattern reasons to prefer one hole behaviour over another,

Re: Uninteresting parameters

2011-09-28 Thread Dean Landolt
On Wed, Sep 28, 2011 at 10:06 PM, Mike Shaver mike.sha...@gmail.com wrote: On Wed, Sep 28, 2011 at 9:11 PM, Brendan Eich bren...@mozilla.com wrote: No worries, array extras are a great addition, we just need to keep rolling. Oh, no offense taken. I just meant to say that there may be

Re: Uninteresting parameters

2011-09-28 Thread Rick Waldron
On Wed, Sep 28, 2011 at 11:05 PM, Dean Landolt d...@deanlandolt.com wrote: On Wed, Sep 28, 2011 at 10:06 PM, Mike Shaver mike.sha...@gmail.comwrote: On Wed, Sep 28, 2011 at 9:11 PM, Brendan Eich bren...@mozilla.com wrote: No worries, array extras are a great addition, we just need to keep

Re: Uninteresting parameters

2011-09-28 Thread Rick Waldron
On Thu, Sep 29, 2011 at 12:09 AM, Rick Waldron waldron.r...@gmail.comwrote: On Wed, Sep 28, 2011 at 11:05 PM, Dean Landolt d...@deanlandolt.comwrote: On Wed, Sep 28, 2011 at 10:06 PM, Mike Shaver mike.sha...@gmail.comwrote: On Wed, Sep 28, 2011 at 9:11 PM, Brendan Eich

Re: Uninteresting parameters

2011-09-27 Thread Brendan Eich
On Sep 27, 2011, at 6:11 AM, Sean Eagan wrote: On Mon, Sep 26, 2011 at 4:47 PM, Xavier MONTILLET xavierm02@gmail.com wrote: Normally, you use an object for optional arguments. This is probably the most common case in practice, however... And there is no good reason not to since you

Re: Uninteresting parameters

2011-09-27 Thread Sean Eagan
On Tue, Sep 27, 2011 at 2:43 PM, Brendan Eich bren...@mozilla.com wrote: On Sep 27, 2011, at 6:11 AM, Sean Eagan wrote: On Mon, Sep 26, 2011 at 4:47 PM, Xavier MONTILLET xavierm02@gmail.com wrote: Normally, you use an object for optional arguments. This is probably the most common case

Re: Uninteresting parameters

2011-09-27 Thread Brendan Eich
On Sep 27, 2011, at 12:50 PM, Sean Eagan wrote: I agree, but it seems like holes in parameter lists would be no more rare than holes in destructuring lists... [a, , c] = arr; Could be. ...so it seems strange to add it to one but not the other. Destructuring uses the same grammar as

Re: Uninteresting parameters

2011-09-27 Thread Dean Landolt
On Tue, Sep 27, 2011 at 4:04 PM, Brendan Eich bren...@mozilla.com wrote: On Sep 27, 2011, at 12:50 PM, Sean Eagan wrote: I agree, but it seems like holes in parameter lists would be no more rare than holes in destructuring lists... [a, , c] = arr; Could be. ...so it seems strange

Re: Uninteresting parameters

2011-09-27 Thread Brendan Eich
On Sep 27, 2011, at 1:21 PM, Dean Landolt wrote: Out of curiosity is there any reason to keep holes the holes around in ObjectLiteral and ArrayLiteral? No holes in ObjectLiteral. It's true for ES6, opt-in only, we could change ArrayLiteral to remove holes. This would make early errors for

Re: Uninteresting parameters

2011-09-27 Thread Dean Landolt
On Tue, Sep 27, 2011 at 4:57 PM, Brendan Eich bren...@mozilla.com wrote: On Sep 27, 2011, at 1:21 PM, Dean Landolt wrote: Out of curiosity is there any reason to keep holes the holes around in ObjectLiteral and ArrayLiteral? No holes in ObjectLiteral. Apologies -- I was thinking of the

Re: Uninteresting parameters

2011-09-27 Thread Brendan Eich
On Sep 27, 2011, at 4:02 PM, Dean Landolt wrote: On Tue, Sep 27, 2011 at 4:57 PM, Brendan Eich bren...@mozilla.com wrote: On Sep 27, 2011, at 1:21 PM, Dean Landolt wrote: Out of curiosity is there any reason to keep holes the holes around in ObjectLiteral and ArrayLiteral? No holes in

Re: Uninteresting parameters

2011-09-26 Thread Xavier MONTILLET
: * rest parameters * destructuring of individual parameters However, there is at least one aspect which is not, which is uninteresting parameters : [x, , z] = arr; which for parameter lists would look like: function(x, , z) {...} This could be useful when you are a defining a callback

Re: Uninteresting parameters

2011-09-26 Thread Dominic Cooney
are supported in parameter lists: * rest parameters * destructuring of individual parameters However, there is at least one aspect which is not, which is uninteresting parameters : [x, , z] = arr; which for parameter lists would look like: function(x, , z