I read an article on this website introducing \NewDocumentCommand.
However, it does not answer such a question: does it breaks the limit that one \newcommand can have at most 9 arguments?
I found almost the same question here where the author @egreg advices to use a comma-separated list of values, i.e.
\foo{1,2,3,4,5,6,7,8,9,10}
However, I do think that in this way we cannot own all the power of \NewDocumentCommand.
I wonder if this is the only way to solve the problem.
PS: I did not meet such a question in reality, and this is just a wonder. I wrote a function with 8 arguments just now, and I am now scared at the situation where some day I want to write a function of more than 9 arguments.
#<single-digit>is built in to the tex grammar you can't really make#<digit><digit>do anything – David Carlisle Mar 06 '21 at 23:43##)? Or what if I want to have an actual command called\arg?. That can't be reasonably implemented, sorry (also 9 arguments is just awful to use: I prefer a command that remembers a bunch of defaults and I just give it what it actually needs for each run) – Phelype Oleinik Mar 06 '21 at 23:48atan2(and it has just two arguments! ;-)). Jokes apart, I think the better solution would be to use a key-value package and have something like\macro{x=1, y=0, }etc with sane defaults. That mimics Python named argument and is a breeze to remember. https://tex.stackexchange.com/questions/26771/a-big-list-of-every-keyval-package – Rmano Mar 07 '21 at 10:20