Re: Another formatting question: Short variable names
Ben Hutchison wrote:
> Bill Venners wrote:
>> Hi All,
>>
>> How do people feel about hd for variables that will hold the head of a
>> list, ls for list, etc. What about pred for predicate?
> However convention establishes some shorter forms, eg x and xs for
> pieces of lists, f and g for opaque function values.
+1 to this. My domain work is mainly in financial software so I often use
"acct", "pmt", etc. for Account and Payment related entities.
That said, I'm a big "NAMES ARE IMPORTANT" guy and too often we, as programmers,
tend to rely (too much) on our ability to do quick mappings of "what this is" to
"what this means". As I get older, I prefer to do less of that and have been
really trying to name things what they are. I see the biggest offenders of
relying on their ability are the younger and less experienced programmers; or
maybe that should be less wizened/lazy? =)
However, as Ben mentioned, some conventions bypass the mapping altogether -
"acct" means "account" to me every bit as much as "account" does.