It's good to think deeply about reasons for implementation details. I'll throw in an example and, hopefully others will contribute in greater detail.
Some internal functions, such as Times
or Plus
(as I showed in your previous question) take not a list, but a sequence of arguments.
If your definition of your f[x__]
contains a lot of Times[x]
and Plus[x]
or similar things, it might make sense to prefer using f[x__]
rather than f[x_List]
and then doing Sequence @@ x
everywhere. If, on the other hand, the right hand side does better with lists, of course the latter definition makes more sense, so the general answer is "it depends".
You can do even better, though, by using more advanced pattern constructs:
f[a:{x__}] := Plus[x]
f[a:{x__}] := Total[a]
The two definitions above give the same result, but access different things (the first extracts every element out of the list and feeds it to Plus
, the latter takes the entire List
that we named a
as a whole and feeds it to Total
. This behavior may have important implications for performance (packed arrays), but I'll leave this part of the discussion for someone else to answer in detail.