On 28/09/2006, at 10:42 AM, dblack / wobblini.net wrote:

>> You would never say in English "a start with b", you say "a starts  
>> with b", even when both a and b are singular. I would argue that  
>> it should be the same in Ruby, and the method name should be  
>> "starts_with?"
>
> I believe the rationale is that it's in the second person: do you
> start with ... ?  I realize Matz mentioned singular vs. plural, but I
> think that was just shorthand for with/without an 's'.  In the past,
> if I remember correctly, he's talked about it as a function of person.

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.

For predicate methods it still seems odd. In the "starts with" case,  
it's not you doing the starting; it's the string (third person) doing  
the starting.

The said, the convention in Ruby does seem to be second person no  
matter what. Witness the "include?" method for example (which has  
always felt a little odd to me too.)

Pete Yandell