Kevin Smith (2013-12-12T20:17:12.000Z)
domenic at domenicdenicola.com (2013-12-24T23:47:03.070Z)
> p2 = p1 ! foo(a, b); > > would be equivalent to > > p2 = Promise.cast(p1).send("foo", a, b); > > which, for local promises, is equivalent to the ES6 > > p2 = Promise.cast(p1).then(r => r.foo(a, b)); > Yes, but "!" isn't agreed upon. By that time, we might be over our CoffeeScript-inspiration long enough to consider thin arrows. After all, thin arrows are used for a different kind of indirection in C. Maybe... > Actually, they do. Thanks to Domenic for triggering the following thought: > > Where > > x => t > > implements the mapping type X -> T, the corresponding > > x =*> t > > implements the mapping type X -> T\*, where the "\*" here reads like the > kleene (or regexp) \*, i.e., this function maps from an X to zero or more Ts. Exactly. That's my point, essentially. The design niche for arrows is expressing simple surjections (with side-effects of course), not one-to-many relationships. > Concise synchronous generators. Restating the feature isn't exactly demonstrating a use case : ) Is there a concrete example which would give us some idea of the benefit of arrow generators? It's difficult because we don't have much data yet. But that lack of data is another argument for reserving await, I think.