[sci.lang] compoundNames

ianf@nada.kth.se (Ian Feldman) (03/29/90)

  Does anyone know the origins (and/or the etymology) of the compound
  variable (and other item) naming convention ie, `variableName'
 `otherItem' etc., in which the two or more parts of someThing are
  delimited by its consecutive parts' beginning letters uppercase
  state, with no spaces in between.  I assume it to have come about
  because of some specific compiler's requirement of strictly alpha
  letters in its variable names.  I believe also to have seen it in
  use around 1985, though I don't quite recall in what circumstances. 
  It would be interesting to find out who was the original
  `motherFather' of such a construct. 
  
  Please enlighten. 

--Ian Feldman /  ianf@nada.kth.se  ||  uunet!nada.kth.se!ianf / "There, Watson!
             /  obviously he is not the ImageWriter hacker we suspected him of"

foster@jumbly.dec.com (Steven Fruitbat Foster) (03/29/90)

In article <3230@draken.nada.kth.se>, ianf@nada.kth.se (Ian Feldman) writes...
> 
>  Does anyone know the origins (and/or the etymology) of the compound
>  variable (and other item) naming convention ie, `variableName'
> `otherItem' etc., in which the two or more parts of someThing are
>  delimited by its consecutive parts' beginning letters uppercase
>  state, with no spaces in between.

I always thought it was done with caps at the start too? Like TwoThings etc.

We ex-basic programmers often adopt such things (first admission - I've just
came out as a basic programmer on the net). AFTER HAVING TO SHOUT ALL THE
TIME IT'S REFRESHING to completely do without capitals (as in C, pascal).
quite often never ever using them at all. Eventually one Adopts a Happy
Medium, with these things being _de rigeur_ in languages such as Modula-2,
where it's a necessary convention.

I think its a nice way to separate words, even though it leads to identifiers
such as ThisIsAVeryDifficultIdentifierForYourIndenterToCopeWith. I suppose
the convention came about when restrictions of 6 char identifiers were
finally removed. Several languages now have these as clarifiers - the object
thisthing, ThisThing and THISTHING can have their types known by how they are
writ.

Fruitbat.

+----------------------------------------------------------------------------+
| Steve Fruitbat Foster   | foster@jumbly.dec.com    [+@uk.ac.nsfnet-relay]  |
| Digital Equipment Corp. +--------------------------------------------------|
| Reading, UK.            | These opinions are not necessarily those of DEC, |
| **STUFF THE POLL TAX**  | my assorted cuddly toys or anybody whatsoever.   |
+----------------------------------------------------------------------------+

Homosexuality: Eight out of ten owners (who expressed a preference) said their
bats *preferred* it.

shore@mtxinu.COM (Melinda Shore) (03/30/90)

[]
I first encountered it in the wacky world of MacIntosh programming around
1984 (shortly after they first came out).  I attended MacHigh School (how
embarrassing), where we were told that at Apple constants were capitalized
one way, globals another, and locals were, I think, all lowercase.  I think
perhaps globals had lowercase first letters but a cap in the middle 
(lowerCase, for example), and constants had uppercase first letters and
perhaps a cap in the middle (UpperCase).
-- 
Melinda Shore                             shore@mtxinu.com
mt Xinu                          ..!uunet!mtxinu.com!shore