Trying my hand at mind-reading, I think that the difference is semantic, maybe with a sprinkling of expressive opportunity. But let me approach this from the duplicated function question,
what is WRI policy for duplicated functions
I won't try to speak about any formal policy, but a certain amount of duplication can be useful. Consider ConstantArray
. One could argue that ConstantArray
is superfluous, because we can accomplish the same thing with Table:
ConstantArray[x, {5, 3}]
(* is equivalent to *)
Table[x, {5}, {3}]
But the subtle differences might come in handy. If you already have the dimensions in the form {5, 3}
then you can apply ConstantArray
directly without destructuring your dimension data. But there is also an expressiveness characteristic here. Scanning your code and seeing ConstantArray
provides an extra semantic hint that Table
does not.
And so we imagine the time when someone at WRI suggested implementing some sort of currying functionality. Typically, currying is just about making a new function with a reduced argument list while keeping the ordering of those arguments. So, f[x, y, z]
could be curried to f[x, y]
(applied as f[x, y][z]
). This suggests a form like CurryApplied[n][f]
. But, Mathematica almost always prefers very generalized functions, and so one imagines that permuting the arguments was discussed, the result being a form like CurryApplied[{i1, ... , in}][f]
.
But now we've opened the semantic can of worms. Should we re-define currying to be a more general operation, or should we envision the "standard" currying as a specific case of a more general operation (which maybe we'll call OperatorApplied
)? CurryApplied
is semantically anchored to reducing the argument list, but it can be generalized to permuting the argument list. OperatorApplied
is semantically anchored to permuting the argument list, but it can be used for the special case of reducing the argument list.
And so the big question: which one should we add to the language? It seems the answer was "both", but since they're each tagged as experimental, we don't yet know WRI's final answer.
The semantic distinction is most clear in how the short forms were defined. For an integer n
, CurryApplied[n]
has a natural interpretation in the reduce-argument-list semantic, whereas OperatorApplied[n]
does not. For a function f
, OperatorApplied[f]
has a natural interpretation in the permute-the-arguments semantic, whereas CurryApplied[f]
does not. So, for all of the overlap in functionality for longer argument lists, one can imagine that it would be nice to have both functions, since the most common cases probably involve short argument lists.
MapApply[f, expr]
to accomplish the existingf @@@ expr
in version 13.1, and many other such examples before. $\endgroup$OperatorApplied
and substituteCurryApplied
and it will not work. Therefore they are different. $\endgroup$