|
Posted by Tony Marston on 10/17/86 11:35
"Wayne" <not@here.com> wrote in message
news:bteoq15jeoqlc2hka2k21jgoca2edmvbhj@4ax.com...
> On 23 Dec 2005 01:15:37 -0800, tony@marston-home.demon.co.uk wrote:
>
>>Wayne wrote:
>>> Ok... so let me get this straight. First you say that mixing cases
>>> is bad and then you say that programmers don't like being told that
>>> case is suddenly important. Those two things are contradictory.
>>
>>What I'm saying is that some teams like their variable names in all
>>upper case, while others like them all lower case. Either is
>>acceptable, but mixing case in the same variable name is frowned upon
>>by both camps.
>
> Ok. But that was my point. What's the point of having
> case-insensitivity if mixing cases is frowned upon. Clearly you only
> want to one case spelling of a function or variable to be valid.
By mixing case I mean mixing case in the same word. Some organisations like
all upper case, some like all lower case, but NOBODY likes a mixture of case
in the same word. That is the difference.
>>> >> People have no
>>> >> trouble will all caps or the first letter capitalized. What about
>>> >> the
>>> >> difference between setsLower() and setSlower()? To a human reader
>>> >> those have different meanings,
>>> >
>>> >Not to me, they don't.
>>>
>>> So lets say we're in a case-insensitive language and the function I
>>> described above is listed in the program with both those cases. Tell
>>> me, please, what does that function do?
>>
>>The function name is listed only once, but it can be invoked in either
>>upper or lower case.
>
> You didn't answer my question! -5 points for you!
You name me any language that has the same function name listed more than
once in a different case. You cannot because there is none. When you see a
function name in a program and you check the manual for its description it
doesn't matter whether it's expressed in upper case, lower case, or a
mixture of case - that function name only has one entry. Just like in any
language dictionary a word is only defined once, and it has exactly the same
meaning whether it is written in upper or lower case.
> Saying that the programmer must go find the original declared version
> of the function to determine what it does, doesn't answer the
> question.
Any language that deliberately allows the same variable or function name to
exist in more than one case, and to have different meanings for each
combination of case would be immediately slammed as being a VERY BAD
language. If a language enforces case-sensitivity by auto-correcting each
name as you key it in, that is acceptable
[Back to original message]
|