RE: Aesthetically pleasing identifier names

new topic     » goto parent     » topic index » view thread      » older message » newer message

Agreed. I do so.
Regards.
----- Original Message -----
From: Brent W. Hughes <guest at RapidEuphoria.com>
To: <EUforum at topica.com>
Sent: Friday, March 04, 2005 5:01 PM
Subject: Aesthetically pleasing identifier names


>
>
> posted by: Brent W. Hughes <bwh566 at yahoo.com>
>
> When I was a young and tender programmer, if I wanted to declare a
function to, say, set a menu bar to a certain value, I would probably name
the function something like "smb" which of course, stood for "set menu bar".
>
> After a few years, I decided that that was not very self-documenting, so I
would name such a variable "setmenubar".  This made the code more readable
and was worth the extra typing.
>
> Sometime later, I saw people using underscores in their identifier names,
and I decided to give that a try.  My function would hence be called
"set_menu_bar".
>
> Still years later, I began to see people using case to separate the
individual words in an identifier name.  I tried it.  My function would now
be called "SetMenuBar".  I found my code to be more readable and much more
aesthetically pleasing.  In fact, I have become a convert to this way of
naming identifiers.  As a convert, I am now trying to get others to see the
light so that it will be easier to read their code.
>
> What do you think?
>
> Brent
>
>
>
>

new topic     » goto parent     » topic index » view thread      » older message » newer message

Search



Quick Links

User menu

Not signed in.

Misc Menu