Look here: https://github.com/tc39/proposal-pipeline-operator/#related-proposals One of the links points to a partial application operator, and alternative proposals in that repo are being actively discussed which don't require partial application. So similar stuff have already been considered, and currying has come up more than once.
My personal argument for curried functions in the spec is that 1. it's generally useful in many contexts, and 2. the engine can better optimize the hell out of it, not having to enter a full function + code context just to return a lightweight closure. (For similar reasons, I've in the past railed engines, in particular V8, for not properly optimizing `Function.prototype.bind`. The call sequence is brain-dead easy to optimize, and there's no good reason for it to be slower than a function expression.) ----- Isiah Meadows m...@isiahmeadows.com Looking for web consulting? Or a new website? Send me an email and we can get started. www.isiahmeadows.com On Wed, Mar 21, 2018 at 3:43 PM, Vikash Agrawal <vikashagrawal1...@gmail.com> wrote: > Hi everyone, > > I was going through the archives and found that some time ago, there had > been discussions around currying > [https://esdiscuss.org/topic/curried-functions] and wanted to know if there > was any proposal for the same or how did the discussion go? > > I feel as we are proceeding with |> the pipeline operator, we should also > discuss the potential of a currying operator and find out if this would be > helpful. > > Regards > ~Vikash > > _______________________________________________ > es-discuss mailing list > es-discuss@mozilla.org > https://mail.mozilla.org/listinfo/es-discuss > _______________________________________________ es-discuss mailing list es-discuss@mozilla.org https://mail.mozilla.org/listinfo/es-discuss