From: "Benjamin J. Tilly" Date: 2001-03-15T07:06:41+09:00 Subject: [ruby-talk:12655] Re: FEATURE REQUEST: 'my' local variables >===== Original Message From Leo Razoumov ===== >>>>> "YM" == Yukihiro Matsumoto writes: [...] > YM> { > YM> e = 1 # e may or may not be local to the block > YM> f := 2 # f is always local to this block > YM> } > >How to read the following? >{ > e = 1 > f := 2 > f = 3 #possible typo? Why would you this this a typo? >} > >I think that the declarative construct { ...} is easier to understand and >harder to misuse. A sign of error in my eyes could be: f := 2 f := 3 But := is just = and be sure that f is a temporary variable. Cheers, Ben