From: Chris Pine Date: 2003-01-11T08:09:52+09:00 Subject: Re: dot-equals method? ----- Original Message ----- From: "Daniel Carrera" > The . has a somewhat different status than + or *, though. > > x += 1 == x = x.+ 1 > x *= 1 == x = x.* 1 > > x .= split ?= x = x.. split Why can't we say: x += 2 == x = x + 2 x *= 2 == x = x + 2 x .= foo == x = x . foo ---------------------------- Well, I think the point that he was making was that: x += 2 means "call x's `+' method, passing in 2" which, if used in the same way, gives: x .= foo means "call x's `.' method, passing in foo" which, of course, makes no sense. That fact that it *looks* like the expansion is so similiar (as you showed in your email) is, I think, why it just *feels* right at first. I think I have started thinking of `.' almost like it's a method, too, but it isn't. Perhaps this comes from thinking of methods and their parameters as simply messages passed. Maybe this all started because I've been playing with `method_missing' too much! After a while, even `def' started to feel like fluff. Time to do something else, :) Chris