yasl icon indicating copy to clipboard operation
yasl copied to clipboard

Allow multiple args to `[...]`

Open CoffeeTableEspresso opened this issue 3 years ago • 1 comments

Something like obj[a, b] should work, to allow for containers requiring multiple indices.

CoffeeTableEspresso avatar Feb 04 '22 02:02 CoffeeTableEspresso

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.

CoffeeTableEspresso avatar Feb 04 '22 02:02 CoffeeTableEspresso