From: Markus Date: 2004-10-09T14:35:19+09:00 Subject: Re: ANN: Free-form-operators patch On Fri, 2004-10-08 at 21:47, trans. (T. Onoma) wrote: > On Saturday 09 October 2004 12:27 am, Jim Weirich wrote: > | trans. (T. Onoma) wrote: > | > Spaces b/c important, which isn't necessarily a bad thing. A rule that > | > operator "on top of operator" requires a space solves problem. So > | > > | > '!1' or '! 1' > | > > | > is fine, but two in a row must be > | > > | > '! !1' or '! ! 1', not '!!1' > | > | This is fine, but at this point you are making incompatible changes to > | Ruby. I don't want user defined operators nearly so much that I would > | want to break existing code. > > Sure. I understand. But I wonder how often two operators are used back to > back? I imagine that the most common case is !-1. And actually I think - + > should probably be considered literal "numeral" chars when in front of other > such chars always. Just the same, given the infrequency, I don't think it's > out of the question, unless I've over looked some common idioms. Think of > any? No, but going through the day's feedback I found a uncommon one: x = proc {|a,*|a} takes one or more arguments and returns the first one, unless you've applied my patch in which case it blows up. I'm fixing all known bugs to post a new version in an hour or so, but this seems pretty perverse to me. Why not just write: x = proc {|a,*ignore|a} or something? -- Markus