yasl
yasl copied to clipboard
Allow multiple args to `[...]`
Something like obj[a, b]
should work, to allow for containers requiring multiple indices.
This creates problems with the related syntax obj[a, b] = val
. We need to be able to pass a variable number of arguments to []=
as the key, but we also need to be able to pass the value here. The conflict comes from needing the variadic parameter to come at the end of the argument list, whereas we naturally would want to evaluate and pass the key before the value in the parameter list.