I was looking over an example of named parameter passing:

        foo(:a<1>, :b<2>)

And had the thought that we might be able to get away with treating named parameters as lvalues, making the above:

        foo(:a=1, :b=2)

Would this be unreasonable? Does it break anything else? I'm not sure that subscripting-like notation would be a bad thing to have, but if we could "assign" an arbitrary expression to a name parameter, I think subroutine and method calls would be a heck of a lot more like their own documentation. It also makes things like this easier to write:


If you use this syntax for something that would be auto-quoted, it's one extra character:


but later edits are less complicated:


Thoughts? Is it too late?

Reply via email to