In article <4060B763.7060903 / infofiend.com>,
Ben Giddings  <bg-rubytalk / infofiend.com> wrote:
: Dave Brown wrote:
: > In article <40607376.2000802 / infofiend.com>,
: > Ben Giddings  <bg-rubytalk / infofiend.com> wrote:
: > : Trying to understand your religion here.  If both methods and variables 
: > : are named with underscores, not camel case how do you distinguish beween 
: > : a method that instructs something to read a certain number, and a 
: > : variable which keeps track of how many times something was read. 
: > : read_number vs. read_number.
: > 
: > read_number <= reads a number
: > number_read <= number of times something was read.
: > 
: > If an attribute name is a verb (or verb phrase), it does something.  If
: > it's a noun, it is something.
: 
: My point is that 'read' is both a verb and a noun.  So is 'hit' and 
: 'run'.  Sometimes whether something is a verbal phrase or a noun depends 
: on how you read it.
: 
: What's the problem with making it more visually distinct?
: 
: readNumber <- reads a number
: number_read <- the number of times something was read
: 
: Now I don't care if number_read is actually done via a method that does 
: some calculation before returning a value.  It *acts* like a 
: variable/attribute, so it can be documented as if it were one.

You just made my argument for me.  A difference in naming scheme just
because a result looks one way as opposed to looking another way makes
no sense--it's simply arbitrary.  Inconsistency in the names of methods
for no good reason just makes your code harder to use.

--Dave