The rules of the case depend on the culture. Do you want a programming language where the variable i sometimes considered the same as the one called i , and sometimes these are different variables? (This is not a compiled example, by the way, in Turkish i not uppercase i .
Honestly, it's pretty simple. Do you want the compiler to correct you when you make a typo, or do you want it to guess what you meant? The latter, as you know, leads to errors. VB assumes “oh, you probably meant the same thing, which is good, we won’t stop you”, and XML took you literally.
Your error did not occur because the case sensitivity is bad, it happened because careless is bad. An arbitrary change of case may, at best, not cause problems, and in the worst case, it will cause errors. Assume the worst and agree with your case. Which, by the way, is what makes you make you perceive case sensitive regions. Regardless of whether your tools are case sensitive, the programmer must be case sensitive. Being case sensitive saves a ton of trouble as long as there are no insensitive as well as sensitive tools in the world. If we could remake the world so that everything was case insensitive, many reasons for sensitivity would disappear. but we cannot.
A short note: In many languages, it is customary to specify variables and types with the same name, but with different capitalization:
Foo foo; // declare a variable foo of type Foo
Of course, you can argue that “you should not do this,” but it’s convenient, and immediately tells the reader what type the variable has. This allows us to create a log class and a log object. And since the purpose of this object is to register, the name is obvious.
And the last thing to consider:
The point is in real languages. A word that starts with an upper case is different from one, but with a leading lower case. The word "worD" is misused in English. Information is encoded in the case, which facilitates the reading of the text. This tells us when we come across a name, for example, or when a sentence begins, which is convenient. Allowing people to ignore the rules of the matter makes it difficult to read the text. And since code should usually be written as readable as possible, why shouldn't we do the same in programming? Let the case encode important information. In many languages, Foo is a type, and Foo is a variable. This is important information. I want to know this when I program. If I see a function called "Getage", I wonder what English word I have never heard before. But when I see “GetAge”, I immediately know that it should be read like the word “Get”, followed by the word “Age”.
By the way, here is a good example of funny surprises that you can come across case sensitive languages.