From: dblack@... Date: 2003-01-11T06:38:42+09:00 Subject: Re: dot-equals method? Hi -- On Sat, 11 Jan 2003, Chris Pine wrote: > However, there is no `split!' method, nor could there ever be, since `split' > is a string method returning an array. That's what I like so much about the > `.=' idea. It doesn't make visual or semantic sense to me; it's neither clearly a method call nor an assignment. I guess the idea is that it's sort of both... but I have trouble perceiving it that way. For example: str.= upcase What that looks like, to me, at most, is a kind of variant on: str = self.upcase with '=' taking message/method syntax. > If something like this were possible, it seems like we wouldn't even need > the `!' methods anymore. Well, I would never use them, but maybe other > people still would if, for some reason, they wanted to change the object > itself... like if other variables were referencing it or something... seems > like kind of screwbally design to me, but what do I know? :) Well, yeah, changing the object itself is the point of the bang methods :-) I don't think the thing you're talking about has a bearing on that; it seems to be more a kind of assignment shorthand. David -- David Alan Black home: dblack@candle.superlink.net work: blackdav@shu.edu Web: http://pirate.shu.edu/~blackdav