From: Devin Mullins Date: 2005-07-16T08:19:14+09:00 Subject: Re: difference? Daniel Brockman wrote: >It's customary not to prefix predicates by `is_'. >For instance, it's `empty?', not `is_empty?'; `frozen?', >not `is_frozen?'; `finite?', not `is_finite?', etc. > > foo.a? Foo > >On the other hand, that doesn't read very well. :-) > >Actually, I guess you could argue that the no-`is_' convention >doesn't apply for parameterized methods. > > Well, is_empty? is different from is_a?, in that "a" is not a property of the object -- rather, it's just part of a sentence-like phrase. I think the no "is_" convention just came about because it was three characters that communicated nothing, and hence were unnecessary. As you saw, #a? looks weird, so the "is_" communicates something important in this case. But really, I don't care which you prefer. (No offense. :) I don't have any problem with using is_a?, as it just plain looks more readable to me. (It doesn't hurt that it's shorter, too. :P) Devin