Re: Function length

2012-06-13 Thread Tom Ellis
I like the look of this: > function add(a,b){ > return a + b; > } > > add.matches(1,2); // => true > add.matches(1); // => false > add.matches(1,2,3); => false I've never had the need to use function.length, I probably will at some point though. If you did somethi

Re: ||= is much needed?

2012-06-12 Thread Tom Ellis
I like the sound of ?= too. var a; //later on a ?= 15; It goes with all the other operators that are out there too (!=, =, ==, === etc). Tom On 12 Jun 2012, at 19:04, Brendan Eich wrote: > Brendan Eich wrote: >> Is this (A ? B) ? C : D or A ? (B ? C) : D. We can disambiguate in the >> for

Re: Why not NodeList#forEach :\?

2012-06-11 Thread Tom Ellis
Awesome. I've had es6-shim for a while now but I haven't used it yet. I forgot what its use was until now. Tom On 11 Jun 2012, at 14:44, Rick Waldron wrote: > > > On Mon, Jun 11, 2012 at 9:09 AM, Tom Ellis wrote: > > ES6 draft specifies a new Array constructor ca

Re: Why not NodeList#forEach :\?

2012-06-11 Thread Tom Ellis
> ES6 draft specifies a new Array constructor called Array.from that will > essentially convert "array-likes" into arrays This will have uses for the arguments objects too, for people that aren't using ...rest in ES6. Tom ___ es-discuss mailing list