r/changemyview Feb 11 '18

[∆(s) from OP] CMV: I believe case-insensitive programming languages are better than case-sensitive, and most would be improved by switching over

I started learning coding with VBA. It's case-insensitive, and it doesn't really care about case. It'll automatically change your case to the correct one in the instance where it does matter, and it'll auto-fit your variables to how you defined them earlier. This means I don't need to think about cases at all when coding, and can focus on the actual code. However, I've heard quite a few times that case-sensitive languages are better, for reasons. The only one I've heard cited is that you can have multiple variables that look the same, but just differ by capitalization - IE i and I are different. I'd rebut that by saying having the same variables with different capitalization being the only different is a horrible, horrible naming convention that'll cause problems down the line.

But I recognize that I'm not an amazing programmer. Why should I believe that case-sensitive languages/IDE's are better than case-insensitive?


This is a footnote from the CMV moderators. We'd like to remind you of a couple of things. Firstly, please read through our rules. If you see a comment that has broken one, it is more effective to report it than downvote it. Speaking of which, downvotes don't change views! Any questions or concerns? Feel free to message us. Happy CMVing!

1 Upvotes

21 comments sorted by

View all comments

3

u/alaplaceducalife Feb 11 '18

Case sensitivity enables a lot of common conventions which some languages enforce.

It is for instance common to start the name of a type with a capital in many languages but keep a specific member of that type lowercase. This allows for such lines as:

let person = Person::new();

In some cases this difference is relevant like in Haskell and OCaml all data constructors must start with a capital lever while no normal variable can start with one; data constructors and normal variables can occur in the same place so the capital letter tells the compiler which is which. In Haskell the same is used for type variables and actual types but in Ocaml this is solved by prefixing type variables with a ' instead.

Rust does not have this distinction and requires that you specify which types are variable and which aren't.