From: Florian Gross Date: 2005-03-24T00:24:48+09:00 Subject: Re: RCR 296: Destructive methods return self Douglas Livingstone wrote: > On Wed, 23 Mar 2005 22:59:49 +0900, Florian Gross wrote: > >>form.button.tabgroup.last.( >> caption = "Foo" >> enabled = true >> top -= 5 >> left += 10 >> onclick = { >> puts "Hello World" >> } >>) >> >>Does this sound sensible? > > Could it act like this: > > [...] > m = Sample.new > > m.{ |self| red = 'read' } > > # or: > > m.do |self| > red = 'read' > end > > puts m.red #=> read While I'm not sure if I prefer this syntax it would still be acceptable. The most important part IMHO is to make sure that in that context 'foo = 1' will not be a local variable assignment but rather a setter invocation. I think I'd still prefer a keyword-based syntax over all this punctuation, though.