From: Josh Cheek Date: 2012-02-01T09:28:23+09:00 Subject: Re: Multiple assignment in conditional --f46d043be25e1bd8a004b7dc2854 Content-Type: text/plain; charset=ISO-8859-1 On Tue, Jan 31, 2012 at 6:22 PM, botp wrote: > On Wed, Feb 1, 2012 at 6:16 AM, Robert Klemme > wrote: > > it's a loop in which case the code often becomes more elegant, e.g.: > > > > while ( line = gets ) > > i dont know, Robert, since i also find > > while ( line,x,y = get_something) > > also elegant. > if ruby would support that, wouldn't it be elegant? > > best regards -botp > > I don't think it would be elegant, because the relationship between the condition and the assignment is obscure. I would assume it's a shorthand for `loop { line, x, y = get_something; ... }` but would have to look at it for a while and then run some experiments to see. --f46d043be25e1bd8a004b7dc2854--