From: Ben Giddings Date: 2004-03-24T07:17:14+09:00 Subject: Re: Need some advice on PickAxe II Dave Brown wrote: > In article <40607376.2000802@infofiend.com>, > Ben Giddings 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. What's the argument against this style of naming methods, aside from personal aesthetics? Ben