From: "Haase, Konstantin" Date: 2010-12-07T19:57:36+09:00 Subject: [ruby-core:33617] Re: [Ruby 1.9-Feature#4085][Open] Refinements and nested methods On Dec 7, 2010, at 11:34 , Charles Oliver Nutter wrote: > On Tue, Dec 7, 2010 at 2:58 AM, Haase, Konstantin > wrote: >> Since I explained one use case I'd have for local rebinding: I think not having local rebinding is mostly what we want, local rebinding would mostly cause unwanted side effects and would be a pure horror to debug. > > So to clarify (for me) what you are saying: you had a use case for > local rebinding, but you don't think it's worth the side effects, yes? > In other words, a +1 reverted to a 0 or -1? > > - Charlie > Yes. Even ignoring the performance impact, the benefits of local rebinding don't justify the harm it could do on an architectural level. The only option would be introducing a switch (as proposed for inheritance), but that would get us back to a global performance hit, would it? One other thing: At the moment, refinements are not only activated by using, but by refine, too. Wouldn't that mean on one hand, that refine would have to be a keyword too, and on the other hand, that you cannot import refinements at all, if those are purely lexically scoped? Konstantin