Article View: comp.lang.misc
Article #5268Re: case sensitivity
From: wsmith
Date: Sat, 12 Mar 1988 03:12
Date: Sat, 12 Mar 1988 03:12
39 lines
2543 bytes
2543 bytes
>In article <2318@bsu-cs.UUCP> dhesi@bsu-cs.UUCP (Rahul Dhesi) writes:
>>Just an opinion: case sensitivity in a programming language is not in
>>itself a bad thing. It is how it is used that can cause problems.
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
>> --> [Arguments]
>>Rahul Dhesi UUCP: <backbones>!{iuvax,pur-ee,uunet}!bsu-cs!dhesi
>
>I disagree. Case sensitivity is always a drag. Someone always will use
>the TWO variables i and I, and I will get quite confused. I like a language
>to treat WriteString as the same identifier as writestring, but I like
>that I can write it both ways.
It is how it is used that can cause problems. If someone names two variables
I and i, he should expect that you, reading his program later, would get
quite confused. >>Naming conventions<< let you use the power of the case
sensitivity safely.
If I have a naming convention that types are declared with a uppercase
first letter and lower case for the rest of the letters, that macros
should be all upper case and variable names should be all lower case and
other rules for procedures, functions and constants, then as long as a
programmer follows the rules no one will get confused. BUT, if
the language is case insensitive, the programmer will start ignoring the
naming conventions because the compiler lets her, and the situation is just as
bad as a case sensitive with no conventions and variables I and i.
The case usage of a token can be used to convey information that is available
elsewhere, but is more convenient to redundantly convey as upper/lower
case letters. The name WriteString is obviously a procedure (based on
most naming conventions). What is writestring? Is it a variable
containing the string that is going to be written out? Is it a boolean
deciding if a string should be written? The language should let you
pick naming conventions and then help enforce them. A case insensitive
language cannot help enforce naming conventions like the ones I describe.
Bill Smith
pur-ee!uiucdcs!wsmith
wsmith@a.cs.uiuc.edu
Technical Details
Message-ID:
<5200002@uiucdcsm>Path:
arc1-ca.pugleaf.net!utzoo!mnetor!uunet!husc6!uwvax!oddjob!hao!ames!pacbell!att-ih!ihnp4!inuxc!iuvax!pur-ee!uiucdcs!uiucdcsm!wsmithReferences:
<2318@bsu-cs.UUCP>Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!mnetor!uunet!husc6!uwvax!oddjob!hao!ames!pacbell!att-ih!ihnp4!inuxc!iuvax!pur-ee!uiucdcs!uiucdcsm!wsmith From: wsmith@uiucdcsm.cs.uiuc.edu Newsgroups: comp.lang.misc Subject: Re: case sensitivity Message-ID: <5200002@uiucdcsm> Date: 12 Mar 88 03:12:00 GMT References: <2318@bsu-cs.UUCP> Lines: 39 Nf-ID: #R:bsu-cs.UUCP:2318:uiucdcsm:5200002:000:2069 Nf-From: uiucdcsm.cs.uiuc.edu!wsmith Mar 11 21:12:00 1988