I am reading :help :call, which states the following:Call a function. The name of the function and its arguments are as  specified with :function. Up to 20 arguments can be used.This makes me wondering: why is there a seemingly artificial limit on the number of function arguments?
Why is there a limit on the number of function arguments?
vimscript
Because this is the size of the data structures used to store function arguments. From eval.c:#define MAX_FUNC_ARGS   20      /* maximum number of function arguments *//* structure to hold info for a function that is currently being executed. */typedef struct funccall_S funccall_T;struct funccall_S{[..]    listitem_T  l_listitems[MAX_FUNC_ARGS];     /* listitems for a:000 */[..]};[..]/* * Allocate a variable for the result of a function. * Return OK or FAIL. */    static intget_func_tv(){    typval_T    argvars[MAX_FUNC_ARGS + 1];     /* vars for arguments */[..]    /*     * Get the arguments.     */    argp = *arg;    while (argcount < MAX_FUNC_ARGS - (partial == NULL ? 0 : partial->pt_argc))    {[..]    }}Well, and so forth.Could this be made dynamic to allow an arbitrary amount of arguments? Sure. But why?fun! TooManyForSanity(one, two, three, four, five, six, seven, eight, nine, ten, eleven, twelve, thirteen, fourteen, fifteen, sixteen, seventeen, eighteen, nineteen, twenty, twentyone)    echo Well...endfuncall TooManyForSanity('one', 'two', 'three', 'four', 'five', 'six', 'seven', 'eight', 'nine', 'ten', 'eleven', 'twelve', 'thirteen', 'fourteen', 'fifteen', 'sixteen', 'seventeen', 'eighteen', 'nineteen', 'twenty', 'OH MY GOD IT NEVER ENDS')This is the sort of code that makes programmers go mad and murder innocent bunnies in their sleep.