[Idea] Script-call consistency with extra args
Right now, I can make a script like this:
function(context,args,other,stuff) {...}
and I can pass data in to other and stuff (and any other args) only if that script is public and called as a subscript. if it is called as a scriptor, or if it is private, there is no way to send data in to other and stuff.
I believe this is because both scriptors and private scripts basically have a wrapper function in between (in the case of scriptors, this is the .call function; in the case of subscripts it checks to ensure that the calling script can call the private script), and these wrappers just pass a single args argument in to the actual script.
If this is true, making scriptors and the private script wrapper take args as a rest argument (i.e. {call:function(...args){}}), and pass it in to our code after a spread operator (i.e. INTERNAL_NAME(context,...args)) would let us pass extra arguments through everywhere except on the CLI itself.
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -