Hacker News new | ask | show | jobs
by raganwald 6497 days ago
It really depends. If the definitions of foo.bar and foo.bash make sense independantly of the assignment to foo, I prefer the second form as well. If in my brain the whole thing is "atomic", I prefer the returning form or to make a helper method so that they are composed into a logical chunk.

For the same reason, I write:

  foo = bar
  bash = blitz
When teh two statements are independant, and:

  foo, bar = bash, blitz
When they are deeply related and should not be broken up. Sometimes that is hard to read and I will get gratuitous:

  begin
    foo = bar
    bash = blitz
  end
What can I say... that uses more characters than needed. It isn't always about saving electrons for me.