[comp.lang.eiffel] Eiffel naming discussion

shelley@btc.sps.mot.com (Norman K. Shelley) (11/29/89)

Discussion regarding Dr. Meyer's naming convention and its rationale.

Page 240 of "Eiffel: The Language" states that "internal upper-case
letters ... as in putAtRight, contradicts the standard conventions of
English ... and is not part of the recommended style."

I agree BUT must note that the underscore ('_') as a word separator is
NOT English either.  A whitespace is the accepted standard but computers
have troubles with whitespace in names/labels so what do we do?  Common Lisp
uses hypens ('-') as a separator and this has more acceptance in English
than an underscore.  So if we can't use blanks because of computer
limitation and
internal upper-case because it does not match current language conventions,
then I think hyphens make MUCH more sense than underscores which themself
do NOT conform to current language conventions.

I prefer internal upper-case letters to signify where new words begin
as it is easier for my eye to determine that those are new words wherea
underscores look like word runons.  I really dislike underscores as word
separators and no separators at all i.e. all lower case are even worse.
As for Hyphens, I could probably train my eye but I'd still prefer
internal upper-case.

Further discussion is welcome.
Norman Shelley
Motorola - BTC
2200 W. Broadway M350
Mesa, AZ 85202
...!uunet!dover!btc!shelley
shelley@btc.sps.mot.com
(602) 962-2473

brucem@hpindda.HP.COM (Bruce Mackey) (11/30/89)

shelley@btc.sps.mot.com (Norman K. Shelley) wrote:

> I prefer internal upper-case letters to signify where new words begin
> as it is easier for my eye to determine that those are new words whereas
> underscores look like word runons.  I really dislike underscores as word
> separators and no separators at all i.e. all lower case are even worse.
> As for Hyphens, I could probably train my eye but I'd still prefer
> internal upper-case.

Which is easier to read:

iPreferInternalUpper-caseLettersToSignifyWhereNewWordsBegin
asItIsEasierForMyEyeToDetermineThatThoseAreNewWordsWhereas

or

I_prefer_internal_upper-case_letters_to_signify_where_new_words_begin
as_it_is_easier_for_my_eye_to_determine_that_those_are_new_words_whereas


IMHO, the underscore combines the two requirements nicely:
   1. continuous non-blank characters for ease of compiler recognition
   2. spacing for ease of human recognition.

-Bruce

Bruce Mackey              | {ucbvax,hplabs}!hpda!hpindye!brucem [UUCP]
Info. Net. Div (IND)      | brucem%hpda@hplabs.HP.COM       [INTERNET]
Hewlett-Packard Co.       | (408) 447-3275                      [AT&T]
19420 Homestead Road,43LT | "If it isn't one thing... it isn't."
Cupertino, CA  95014  USA | "There ain't no such thing as a free lunch"

sakkinen@tukki.jyu.fi (Markku Sakkinen) (11/30/89)

In article <40650001@hpindda.HP.COM> brucem@hpindda.HP.COM (Bruce Mackey) writes:
-shelley@btc.sps.mot.com (Norman K. Shelley) wrote:
-> I prefer internal upper-case letters to signify where new words begin
-> as it is easier for my eye to determine that those are new words whereas
-> underscores look like word runons.  I really dislike underscores as word
-> separators and no separators at all i.e. all lower case are even worse.
-> As for Hyphens, I could probably train my eye but I'd still prefer
-> internal upper-case.
-
- [...]
-IMHO, the underscore combines the two requirements nicely:
-   1. continuous non-blank characters for ease of compiler recognition
-   2. spacing for ease of human recognition.

Shelley had also written:
->Page 240 of "Eiffel: The Language" states that "internal upper-case
->letters ... as in putAtRight, contradicts the standard conventions of
->English ... and is not part of the recommended style."
->
->I agree BUT must note that the underscore ('_') as a word separator is
->NOT English either.  A whitespace is the accepted standard but computers
->have troubles with whitespace in names/labels so what do we do?  Common Lisp
->uses hypens ('-') as a separator and this has more acceptance in English
->than an underscore.  So if we can't use blanks because of computer
->limitation and
->internal upper-case because it does not match current language conventions,
->then I think hyphens make MUCH more sense than underscores which themself
->do NOT conform to current language conventions.

I think Mackey's requirements don't really rule out hyphens either.
But the problem with hyphens in programming languages is that they look
so similar to minus signs. In fact, all standard character codes
(as far as I know) have made the mistake to totally confound the two.

Markku Sakkinen
Department of Computer Science
University of Jyvaskyla (a's with umlauts)
Seminaarinkatu 15
SF-40100 Jyvaskyla (umlauts again)
Finland