From: "Hal E. Fulton" Date: 2002-08-04T10:02:56+09:00 Subject: Re: Should this work? ----- Original Message ----- From: "George Ogata" Newsgroups: comp.lang.ruby To: "ruby-talk ML" Sent: Saturday, August 03, 2002 6:56 PM Subject: Re: Should this work? > > Should multiple assignment work for the > > syntax-sugar "reflexive" operators? > > > > x, y, z = 1, 2, 3 > > x, y, z += 5 # 6, 7, 8 > Where do you propose we draw the line? > > x, y, z = 1, 2, 3 > x, y, z += 5 # 6, 7, 8 > > x, y, z = [], [], [] > x, y, z << nil # [nil], [nil], [nil] > > x, y, z == [nil] # [true, true, true] > > (x, y, z).method(arg) # hmm... Well, = and += are both considered assignment operations. That's enough rationale (for me) to draw the line with +=, -=, and the others. Truthfully, though, some of your constructs above look almost tempting. I would *not* go for ==, but for << and .method I *might* be persuaded. Hal