Re: Re: Existential Operator / Null Propagation Operator

2015-10-29 Thread Eli Perelman
2 dots may be problematic when parsing numbers (yeah, I know it's probably not common, but it's still valid): 3..toString() Eli Perelman On Thu, Oct 29, 2015 at 1:29 PM, Sander Deryckere <sander...@gmail.com> wrote: > > > 2015-10-29 19:22 GMT+01:00 Laurentiu Macovei <a

Re: Decorators for functions

2015-10-20 Thread Eli Perelman
More drive-bys. I could see decorators as a nice way to define "functional" behavior for generic functions: @curried var add = (a, b) => a + b; @memoize var fetch = (url) => /* logic */; Eli Perelman On Tue, Oct 20, 2015 at 8:42 AM, Kevin Smith <zenpars...@gmail.com>

Re: Re: Additional Math functions

2015-10-01 Thread Eli Perelman
In case it didn't come across, this is the thread I'm reviving: https://mail.mozilla.org/pipermail/es-discuss/2015-April/042732.html Eli Perelman Mozilla On Thu, Oct 1, 2015 at 5:51 PM, Eli Perelman <e...@eliperelman.com> wrote: > Reviving this thread, doing any type of simple s

Re: Re: Additional Math functions

2015-10-01 Thread Eli Perelman
? P.S. Definitely not against even more core stats methods, but have to start somewhere. :) Eli Perelman Mozilla ___ es-discuss mailing list es-discuss@mozilla.org https://mail.mozilla.org/listinfo/es-discuss

Re: Additional Math functions

2015-10-02 Thread Eli Perelman
In addition, using reduce just to sum array elements forces a function execution for every element. May not be bad for a minimal count of elements, but doing statistical work on larger collections would benefit from having an optimized summation. Eli Perelman On Fri, Oct 2, 2015 at 3:23 PM

Re: Re: Additional Math functions

2015-10-05 Thread Eli Perelman
. Eli Perelman On Mon, Oct 5, 2015 at 6:06 AM, Isiah Meadows <isiahmead...@gmail.com> wrote: > 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 >

Re: Function constants for Identity and No-op

2016-08-10 Thread Eli Perelman
allusion to potential benefits is avoidance of re-declaration (DRY) and allocation. Just my thoughts. :) Eli Perelman On Wed, Aug 10, 2016 at 9:08 AM Mark S. Miller <erig...@google.com> wrote: > On Wed, Aug 10, 2016 at 2:10 AM, Isiah Meadows <isiahmead...@gmail.com> > wrot

Function constants for Identity and No-op

2016-08-09 Thread Eli Perelman
specified (contrived): const action = (handler = Function.IDENTITY, value = 10) => handler(value); ``` Thoughts? Seems like something simple with positive value. Thanks! Eli Perelman ___ es-discuss mailing list es-discuss@mozilla.org https://mail.mozilla.org

Re: Guidelines and General Direction for Standard Library Proposals

2017-08-06 Thread Eli Perelman
web, servers, and hardware/bare metal, where package dependency considerations are real. Keep that in mind. :) Thanks, Eli Perelman On Sun, Aug 6, 2017, 6:44 AM kai zhu <kaizhu...@gmail.com> wrote: > inline > > WeakReferences, > > -1 footgun most web-devs have no idea how to use

Re: Guidelines and General Direction for Standard Library Proposals

2017-08-06 Thread Eli Perelman
age and want to stick with JS, you're boxing them into an impossible situation. Also, you're generalizing all JS users as web developers. Let's let JS do *more* than just web development, as Node.js has proven is desired. Eli Perelman On Sun, Aug 6, 2017, 7:45 AM kai zhu <kaizhu...@gmail.com&

Re: Shorthand for "function" keyword

2017-11-10 Thread Eli Perelman
ing functions. TLDR; to me this is -1. Eli Perelman On Fri, Nov 10, 2017 at 4:51 PM T.J. Crowder < tj.crow...@farsightsoftware.com> wrote: > On Fri, Nov 10, 2017 at 7:25 PM, Laurentiu Taschina < > source.spi...@gmail.com> wrote... > > So the TL;DR of all that is: You thi

Re: Touch/Trackpad finger position

2017-11-07 Thread Eli Perelman
The ECMAScript language deals with semantics around the specific programming language, while native interactions are supplied by the host environment, e.g. Node.js and the browser. This is why interactions like window and document events are defined by W3C and friends, and strictly-language items

Re: What do you call a `function` function?

2018-04-07 Thread Eli Perelman
I've always referenced them as: Function declarations: function a() {} Function expression: const a = function() {} Named function expression: const b = function a() {} Arrow function: const a = () => {} Not sure it's 100% semantic or descriptive, but it's how I've differentiated.