A WL (Mma) program is a sequence of expressions to be evaluated, which generally involves applying commands and functions to actual arguments. What is the accepted terminology for what I think of as a function call? (Is this somehow misusing concepts from other languages?) What is the name for the square brackets used to make such a call, which I would be inclined to call call brackets?
The documents seem most often to say we use a command. But I hate this, since we also "use" a command if we pass it as an argument (e.g., to map it over a list). Is the documentation terminology just being folksy, or is it meant to be technical? If the latter, what is the terminology for distinguishing these different kinds of uses?
And btw, does the word "command" always imply a WL builtin, while "function" implies it is a user created callable? (Is there a WL term for "callable"? And finally, what is the test for callability, since CallableQ does not exist?)
expr
,expr[args]
is also an expression that will evaluate to something (possibly to itself). It's true even for basic atomic expressions e.g.5[a, b]
is a valid expression, I don't think I've seen any practical use for such expressions, but there's nothing "incorrect" about them. In that sense everything is "callable". On the practical side, I can see a need to answer following question. Given expressionexpr
and argumentsargs
of certain "type" will result of evaluation ofexpr[args]
be of some other "type"? $\endgroup$