Hi,

In message "Re: semenatics of if/unless/while statement modifiers"
    on Tue, 22 Nov 2005 17:10:32 +0900, Stefan Kaes <skaes / gmx.net> writes:

|I perfectly understand your argument. Anyone writing code like this
|
|x = (
|       line1;
|       line2;
<snip>
|       line29;
|       line30) if expr
|
|should be shot ;-) although it's legal syntax.
|
|Fact is, noone writes it that way.

Because you shoot all who write in that way. ;-)

The current syntax rule is:

  if assignment is done, a right hand side identifier is a local
  variable thereafter.

And your proposed rule is:

  if assignment is done, a right hand side identifier is a local
  variable thereafter.  and assignment in modifier condition affects
  modifying statement as well.

Despite your first impression, it's complex and confusing rule.
Besides that it doesn't help cases like:

  while true
    a
    a = 1
  end

Only alternative reasonable rule I can think of is:

  if there is assignment, a right hand side identifier is a local
  variable in the current scope.

But it's rather drastic change.  I'm not sure if it's a good rule,
or worth the change.

							matz.