Re: Re: Additional Math functions

2015-10-05 Thread Rick Waldron
On Mon, Oct 5, 2015 at 2:58 PM Marius Gundersen wrote: > Wouldn't it make sense to wait for the bind syntax [1] before introducing > new methods that work on arrays? > The functions don't accept arrays or operate on arrays—they accept any number of arguments (eg.

Re: Re: Additional Math functions

2015-10-05 Thread Marius Gundersen
Wouldn't it make sense to wait for the bind syntax [1] before introducing new methods that work on arrays? That way it could be added to a standard or non-standard module without altering either the Math object or the Array/Iterator prototype. Something like this: ``` import {sum, mean} from

Re: Look-behind proposal in trouble

2015-10-05 Thread Sebastian Zartner
Hi together, Brian, where can people get the information about the reasons of such decisions (besides asking) and more generally about the processes behind the ES development? I was following Nozomu's proposal[1] closely, though to me it looked like the progress on this just died out.

RE: Look-behind proposal in trouble

2015-10-05 Thread Brian Terlson
Hi Nozomu, Brendan has indeed discovered he doesn't have time to champion the proposal through TC39, so I removed it while I searched for a new champion. Good news on that front - I have found one! Gorkem Yakin works on the Chakra team and is available to help move this proposal forward. I

Re: Look-behind proposal in trouble

2015-10-05 Thread Nozomu Katō
Hello Brian, I thank you very much indeed for your email and bringing really good news! I thought that my proposal might not be able to move forward anymore. I am also thankful that you searched for a new champion and Gorkem undertakes this proposal! Regards, Nozomu Brian Terlson wrote on

bugs.ecmascript.org: email notifications broken?

2015-10-05 Thread Michael Dyck
Email notifications from bugs.ecmascript.org appear to be broken. The last email msg I received from bugzilla-dae...@bugs.ecmascript.org was on 2015-07-20. Starting 2015-07-27, there have been changes to 32 bugs that I should have received notice of. So it seems like the breakage occurred in

Re: Function.prototype.partial

2015-10-05 Thread Isiah Meadows
I agree that it would be nice. I frequently come up with a helper function for that, although my lazy fingers don't feel like typing 7 letters each time to create a partially applied function... ```js // Maybe Function.prototype.part? list.map(create.part('type')) ``` On Sun, Oct 4, 2015 at 4:07

Re: rest parameters

2015-10-05 Thread Isiah Meadows
I'm not trying to restart debate on this, but I do know CoffeeScript allows it. It does a greedy grab, but it only allows a single spread element, and default parameters take full precedence over rest parameters in what is taken. [1] As for optimization, that's probably the bigger issue. It's not

Re: Re: Additional Math functions

2015-10-05 Thread Isiah Meadows
Am I the only one here wondering if at least most of this belongs in a separate library, rather than JS core? 1. Most everyday programmers would be okay with this. 100% accuracy isn't a requirement, but speed often is. ```js Math.sum = (...xs) => xs.reduce((a, b) => a + b, 0); Math.mean =

Re: Reflect.getDefaultParameterValues

2015-10-05 Thread Isiah Meadows
I'm thinking of the same questions. I have yet to think of any use cases for this. On Mon, Oct 5, 2015, 10:32 Thomas wrote: > My initial thoughts: > > Perhaps exposing parameter names isn't a good idea - perhaps just return > an array? You could easily pass an

Re: Re: Additional Math functions

2015-10-05 Thread Eli Perelman
We aren't really arguing whether this can be in a separate library; in fact, it is probably implemented many times over in separate libraries. My argument is more that there is a deficiency if this must be reimplemented many times across those libraries. Another deficiency lies in the fact that

Re: Reflect.getDefaultParameterValues

2015-10-05 Thread Claude Pache
Question: What are the use cases? An issue with that sort of reflection API, is that it exposes how the function is defined rather than how the function behaves. That makes refactoring more brittle. —Claude > Le 5 oct. 2015 à 16:04, Benjamin Gruenbaum a écrit : > >

Reflect.getDefaultParameterValues

2015-10-05 Thread Benjamin Gruenbaum
Hey, other languages with default parameter values like Python, C#, Ruby and PHP have a means to retrieve the default parameter values of a function. >From what I understand (correct me if I'm wrong) - there is no way to get the default values of a parameter of a function in JavaScript. For

Re: Reflect.getDefaultParameterValues

2015-10-05 Thread Thomas
My initial thoughts: Perhaps exposing parameter names isn't a good idea - perhaps just return an array? You could easily pass an array to .bind, .call, etc. I'm not sure the use cases for such a feature make it worth adding - isn't this a problem better solved by documentation? But if it did

Re: Reflect.getDefaultParameterValues

2015-10-05 Thread Benjamin Gruenbaum
Well, I've personally thought about building a small pattern matching library using the syntax, but that's hardly a general use case: ```js match( (x = 1) => doFoo(...) (x = {y : 3}) => doBar(...) ``` However, there are several use cases people mention. Here are the first twofrom questions