On Wed, 05 Nov 2008 18:32:41 -0500, Tim Hunter wrote:

> Greg Hauptmann wrote:
>> when should I use ? at the end of a method name?.  for queries that
>> return (a) boolean value, or (b) any return values? ie any method that
>> returns data
>> 
>> Thanks
>> 
>> 
> By convention the ? suffix is reserved for methods that return a boolean
>   value. Note that all methods return some value, even if it's just nil.

The defined? operater breaks that convention. It returns nil if the name 
it's given is undefined, but a string indicating what kind of object it 
is if the name is defined. So you could say the ? suffix is intended for 
methods whose outputs are usually treated as boolean.

-- 
Chanoch (Ken) Bloom. PhD candidate. Linguistic Cognition Laboratory.
Department of Computer Science. Illinois Institute of Technology.
http://www.iit.edu/~kbloom1/