FWIW, I do think that the late 1960s saw a broad "new prog lang" evolution away from case insensitive (often ALL CAPS due to low resolution dot matrix printers/display devices) stylistic tendencies in, e.g. LISP and FORTRAN, towards case sensitivity and lowercase. So, I suspect this was the salient driver - "We have lowercase now/text is more legible! Let's use it!". (Yes, mechanical typewriters/typesetting had it for decades to centuries, but programming was not done on those, but with printers and punch cards and just starting to be on CRTs.) There are analogies with Unicode in PLs these days (though there are obviously also other motivations these days/decades with the compute world i18n).
all the time in Python.
date = new Date()
all the time in JS.
Those are just the two languages I spend the most time in, but, but I'm sure it's trivial to find numerous examples of cases carying meaning in case-sensitive languages. Especially ones which encourage camel casing.
For instance, in C#, with capital-case convention for variables, it is common to give a variable the same name as the type.
eg `public Player Player;`
ForMid = 4 # padding for middle box in px
And: FormId = 3 # ID of the form in the user process
Should definitely not be resolved as the same variable.It isn’t the default, though.
1) The compiler gives you an error, this would be my preferred solution though I'm not aware of any language that does that.
2) These end up referring to the same variable with no error. Nim's solution.
3) These are actually different variables with no error. The common solution.
Again, I would prefer (1) but I think that (2) is a safer way of handling the situation than (3).