3 ms·
I've been wondering if there's any value in having a syntax for partial application that works more like: fun(arg1, _, arg3) where the "_" indicates a skipp
by bunderbunder 8y ago
I've been wondering if there's any value in having a syntax for partial application that works more like:
fun(arg1, _, arg3)
where the "_" indicates a skipped argument. My thought being that, in return for being a little bit more syntax-heavy, you'd get several potential advantages: No need for parameter rearrangement functions, easier overloading, and the more explicit syntax might help with maintainability.
- cinnamonheart 8y agoScala uses this syntax and I find it to be quite nice: (0 to 100).map(someFunc(arg1, arg2, _, arg3))
- jgamman 8y agoas does Mathematica. v useful for pattern matching as the hook for the function.