From: Trans Date: 2006-12-08T22:15:13+09:00 Subject: Re: invasive parameters as method mode variables Louis J Scoras wrote: > You are exactly right: it is _less_ of a violation. However, I think > this is the part where I'm supposed to mention something about a > ``slippery slope.'' :-) point taken. > No, it's perfectly clear. What it lacks is concision, and while > concision is a desirable quality, it is not worth trading for clarity > and transparency. Saving a few keystrokes is not a good reason for > adding a new mechanism that acts at a distance. Well, "perfectly" is certainly overstating but I take you point. However, it's not just keystrokes. Have to create a new Enumerator object is also much less efficient. > > In anycase, perhaps any breakage of the local encapsulation is too > > much, and matz will never grant us Binding.of_caller. But then why does > > this global default on String#each persist? > > I can't offer much insight on that, but I'd suspect it's historical. I had talked to matz about it once, and he essentially said he didn't want it for simplicity sake. I can;t say I quite understand that, but there it is. hoever you just helped me release taht in 1.9+ the situation is at least improved b/c "string".each(//) #=> enumerator Still less efficent but at least concise. And the global default can go away. T.