From: Hal Fulton Date: 2006-09-28T13:19:50+09:00 Subject: Re: String starts? and ends? methods Marcelo Alvim wrote: > On 9/27/06, Pete Yandell wrote: > >> For non-predicate methods, the second person makes sense. Take >> String.squeeze for example...that's really about you (the second >> person) squeezing the string. > > > Sorry for entering this thread now to give my two cents. I'm sorry > because I'm a Ruby newbie AND a non-native english speaker, but I > thought I should say this. > > I don't think the person is really the question here. I think it's the > imperative form of the verb. > In that case, I have always interpreted that (both in english and in > my native language) as you telling the string to squeeze itself. > File.open, for example, reads like "Hey, File class, open this for me, > please". I'm imperative, but polite :). Interesting. Some methods are imperative in form. But the ones that are interrogative take the form they do (IMO) because it's the infinitive form of the verb. (Of course, the imperative usually uses the infinitive...) > I think that's why most methods which do not ask for something are > written like that. I'd also prefer the "starts_with?" name, but if > "start_with?" is more consistent, I say stay with that. We agree on that. Besides, after 13 years, this convention is not likely to change. Hal