From: Dan Doel Date: 2003-11-20T15:38:51+09:00 Subject: Re: x.f! RCR Well, I agree. However, I would argue that there should be a #delete and #delete! for that very reason. I was merely arguing that #delete doesn't necessarily have to modify the array in place you could have: a = ["a", "b", "b", "c"] b = a.delete "b" p a # => ['a', 'b', 'b', 'c'] p b # => ['a', 'c'] And then #delete! would make sense as you describe. As I glance at the documentation, there is no method that does this currently, although it could be easily done with #map and #compact. In fact, all destructive methods could be done this way. Some would be somewhat stupid, such as #clear which would just return an empty array, which is fairly useless except in the #clear! case. The downside of the a.f! => a = a.f proposal is that sometimes the former can be implemented much more efficiently than the latter. Oh, and when I said "side-effects" in my last mail, I actually meant side-effects due to assignment. I realize there are others such as reading and writing data, and I'm sure you're right that Scheme doesn't use ! in those cases. However, I believe there's a convention that if a function modifies one of the arguments (that is, uses (set!) with them), the function also includes an ! in the name. Regards. - Dan