Syntax sugar for partial application

liorean liorean at gmail.com
Thu Apr 9 13:04:08 UTC 2015


Do we really need it?
Your «foo(1, ?, 2);» is equivalent to «a=>foo(1,a,2)».
Your «foo(?, 1, ???);» is equivalent to «(a,...b)=>foo(a,1,...b)».
Your «foo(1, ???, 2);» is equivalent to «(...a)=>foo(...[1,...a,2])».

Also, the ? token is already taken by the ternary conditional
operator. Do we really want to overload it here for a nullary
operator/special form, when we have as low overhead syntax as we
already do in fat arrows for doing the exact same thing?
-- 
David "liorean" Andersson


More information about the es-discuss mailing list