3 ms·
"case insensitive identifiers" Why is this considered bad? I tend to think the opposite. I've never come across a convincing argument in favour of case-sensiti
by open-source-ux 10y ago
"case insensitive identifiers"
Why is this considered bad? I tend to think the opposite. I've never come across a convincing argument in favour of case-sensitivity.
In fact, every language that is case-sensitive always warns users to be alert to misspelled case-sensitive identifiers as a source of errors.
"there's nothing more likely to repel a new developer than forcing them to switch to a new coding style."
So the principal reason in favour of case-sensitivity is habit and familiarity on the part of the programmer (rather than any sound or convincing design reasons)?
- watt 10y agoI did some VB6 coding back in the day. I simply loved it how you could write identifier without any regard to case (lowercase), and IDE would bump it to correct capitalization automatically. And when you decide to change capitalization in variable declaration, it would then re-capitalize it in your sources, sort of "rename variable" refactoring lite. And yes, it's pretty insane that languages will treat 2 differently-cased variables as separate, or indeed even allow them. If compiler is allowed to play dumb, at least modern IDEs will flag such code, and modern lints will not allow it.
- pjmlp 10y agoVB.NET still works that way. Likewise the SQL, Oberon and Modula editors, where keywords are uppercase by convention.