From: Gavin Sinclair Date: 2004-04-05T02:46:47+09:00 Subject: Re: deciding between ruby and python On Monday, April 5, 2004, 12:09:58 AM, Yukihiro wrote: > Hi, > In message "Re: deciding between ruby and python" > on 04/04/04, Dan Doel writes: > |At least, that's how I've seen it described (and a quick check reveals that > |join calls #to_s, never #to_str, and when I redefine #to_s, it can throw an > |exception, just like Python would). > Maybe "join" should call "to_str" instead of "to_s" in the future. Bad idea, IMO. "join" is designed for returning a string. It therefore has the right to create strings as necessary for this purpose. "join" is similar to "puts" in this regard. And to consider another angle: join is a generally useful method. #to_str is only implemented in a small set of classes. "join" would become a lot less useful if you implemented that change. David Black's comments on this elsewhere were also illuminating. Cheers, Gavin