From: Dan Doel Date: 2004-05-02T06:43:25+09:00 Subject: Re: Why no Proc##[]=() ? Why no Proc##replace() ? I'm not sure what your proposal means. If x is a Proc object, then x[arg1, arg2, ...] Means to call the code stored by the Proc with the specified arguments. What would x[arg1, arg2, ...] = val1, ... Mean? In your example, we don't appear to be doing any actual assigning. We're just moving an argument to the proc out of the []. So the following would be equivalent: x[a, b, c] x[a, b] = c I'm not sure why you would want to do that. Also, Proc objects are simply wrappers around some code, so I see only two ways that x[*args] = b would make any sense semantically: 1) x[*args] returns some assignable value. But Ruby doesn't allow overriding of assignment, so that point is moot. 2) x[*args] = c makes x contain new code somehow. But that doesn't make any sense either, really. Also, what would Proc#replace do? Replace the code to be executed? You can just make a new Proc if you want to do that. The only reason that #replace could be different is if it kept the original binding, which means that you could make a proc in one scope that creates variables in a completely different scope, which would probably be impossible to compile, among other things. Could you explain some more? - Dan