From: Robert Dober Date: 2006-03-21T23:04:24+09:00 Subject: Re: iterate chars in a string ------=_Part_15720_22248387.1142949847954 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Content-Disposition: inline Sorry for the doubletons, I am working on it :( I am not aware of the impact this kind of discussion might have on the evolution of Ruby <> but I fail to understand why extending the behavior of String#each in a complete backward compatible way might be a problem. In my ideal Ruby World aString.each would do what it ever did aString.each(anotherString) would do what it ever did but aString.each(aFixnum) will get us slices "doing what one might expect it to do". aString.each(0) might implement an endless loop (naah too dangerous) aString.each(nil) might become meaningful in some other ways Matz did such a great and beautiful work on getting close to that ambitous goal and I still have the feeling that String#each does not fit into that picture. The beauty of the thing is that ruby is probably one of the few languages where that kind of discussion can occur, others beeing too ugly anyway to pleed for beauty ( very biased oppinion, I admit) On 3/21/06, Trans wrote: > > > Another lib might change *anything* on you :-) We all have to trust > > each other not to do that. > > Of course, but the behavior of String#each is not a good context to > _invite_ global modification. The behavior needs to be more reliable > then that. > > T. > > > -- Deux choses sont infinies : l'univers et la b=EAtise humaine ; en ce qui concerne l'univers, je n'en ai pas acquis la certitude absolue. - Albert Einstein ------=_Part_15720_22248387.1142949847954--