61.3k views
1 vote
Many languages distinguish between uppercase and lowercase letters in user-defined names. What are the pros and cons of this design decision?

1 Answer

7 votes

Answer:

Step-by-step explanation:

The reasons why a language would distinguish between uppercase and lowercase in its identifiers are:

(1) So that variable identifiers may look different than identifiers that are names for constants, such as the convention of using uppercase for constant names and using lowercase for variable names in C.

(2) So that the catenated words such as names can have their first letter distinguished, as in Total Words. The primary reason why a language would not distinguish between uppercase and lowercase in identifiers is it makes programs less readable, because words that look very similar are actually completely different, such as SUM and Sum.

User Duvo
by
3.6k points