compoundNames

Steven Fruitbat Foster foster at jumbly.dec.com
Thu Mar 29 23:37:07 AEST 1990


In article <3230 at draken.nada.kth.se>, ianf at 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 at jumbly.dec.com    [+ at 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.



More information about the Comp.lang.c mailing list