4 ms·
Not case sensitive.
by MiyamotoAkira 4y ago
Not case sensitive.
- JoachimS 4y agoHard pass.
- lockhouse 4y agoWhat purpose does case sensitivity in a programming language serve? Why would I ever need foo, Foo, and FOO to refer to completely different things?
- pcvonz 4y agoGrep-ability for one. This would also make Vim's default '*' behavior less useful. Weird choice, I've programmed in a language that wasn't case sensitive and it's no fun to read legacy code where the casing changes everywhere.
- samatman 4y agofunction Foo.bar(foo, foo_param) foo.buxx = foo_param or FOO return foo end
- sigzero 4y agoAren't a host of the more popular languages case sensitive (C, C++, Java, Python, etc.)?
- adwn 4y agoVHDL, for example, is case insensitive. This means that if I have a simple architecture with a single FSM, and I define a type and a signal for the FSM state like this: architecture impl of SimpleModule is type State is (Idle, Busy, Done); signal state: State; begin ... end; I get an error message for the signal declaration, because the identifier state is already used for the type State. It's easy to fix (for example, using FsmState and fsm_state), but it's just so annoying each and every time.
- MiyamotoAkira 4y agodone today on python someMock = SomeMock() Also, inconsistency. The example that they put is SHOWLN and showln, and they use all over the place showln, but then they write ReadLN. Driving me cranky :-)
- randallsquared 4y ago'f' and 'F' are different characters in ASCII, Unicode, or whatever. You have to go out of your way to make them refer to the same thing, and since casing isn't one-to-one for every character, you have to have arbitrary rules: should 'ss', 'SS', and 'ß' be treated interchangeably everywhere?
- usrbinbash 4y agoBecause naming conventions are important for code reability. When I look at a piece of code and I see something like "FOOBAR" I can be quite sure that I am looking at some variable in the global namespace. "FooBar" is most likely a class/struct. `foobar` could be a local name or a function. Sure, these are conventions and don't need to be observed technically, but they are, because they are useful, same as it's useful to name counter variables in loops "i" instead of "localLoopIterationCounterVariable". Oh and of course there are languages where case actually does matter syntactically, like Golang. All of that flies out the window in a language that simply ignores case. And it is at this point where I pose the counter-question: What makes ignoring case in a programming language useful?
- kbelder 4y agoI think case sensitivity in a language, or a shell, is a mistake; but I'm outnumbered 100 to 1 by people who want it.
- usrbinbash 4y agoAnd why do you think that? 'a' and 'A' are two different code points. The computer doesn't care about our cultural notation that they are two somewhat-related things. One is `1100001` the other is `1000001" Therefore they mean, and should mean, different things.