Example of real world usage of function bind syntax

Claude Pache claude.pache at gmail.com
Thu Jun 11 22:36:09 UTC 2015


> Le 11 juin 2015 à 17:56, Jordan Harband <ljharb at gmail.com> a écrit :
> 
> I find the call form of the operator (`a::b()`) very useful on its own.
> 
> However, I think the main question is, will shipping the prefixed bind or prefixed call forms of the operator (`::a.b`, `::a.b()`), and/or the bind form of the operator (`a::b`), definitely preclude future extension with partial application, etc, or can those still be worked in somehow? If there's a way to include all four forms and leave open the future possibility of extension, I think, as Domenic points out, that we would see a lot of value from the bind and prefix forms as well.

The prefixed bind operator won’t preclude the possibility to add syntax for partial application; the only limitation is that those two separable operations could maybe not be conflated into one operator, like the `.bind()` method.

A more interesting issue in my view is whether a prefix (`::obj.meth`) is the best syntax. An infix alternative like `obj->meth` might be interesting if the left term is itself a complex expression.

—Claude



More information about the es-discuss mailing list