Similarly, case insensitivity, of course, means `foo == fOO == fOo == foO`. Reducing these to one identifier means less ambiguity to the programmer and encourages either using sensible names that can't easily be confused, and/or unambiguous mechanisms like the type system designed for this purpose.
Say you have a constant for 'light enabled' Instead of naming it `lEn`, it's better to use `type LightState = enum disabled, enabled` and write `light.set enabled` for so many reasons. Same goes for pretty much everything. It's worth noting as well that the language is very good at resolving overloads by type, so if you have your own object and create a `len` for it, it's not going to get confused with the string `len` or even a `lEn` constant. Even if you have a `lEn` and `len` that are used in the same context with the same types (why though), you can qualify it anyway with `module1.lEn` or `module2.len`.
The language has so many easy tools to make things more explicit and easier to read at the same time. Ultimately, case sensitivity only really ends up encouraging bad naming practice without adding anything back.
https://twitter.com/ID_AA_Carmack/status/1592560938208710659...
There's also cases where case sensitivity should matter in naming in my experience, and it's not possible without it.
Very curious about those cases, yet to find one myself that was not because of a bad design decision. Though I am also very big on the idea of `ambiguous grammar, rigorous implementation`, for natural language too. (Toki Pona is a somewhat extreme example but the contextual grammar, and holistic minimalism is fascinating)
Not to make it longer than needs to be; But take the example code in this readme: https://github.com/guzba/mummy
Being able to quickly script this without thinking about cases or style on the first pass is a really lovely way of reducing friction imho.
I'm really curious, do you have any examples? I can't think of any that wouldn't be better served by using the type system.
Why would having two functions, named makeFile and make_file in the same program ever be a good idea?
Think of it as less of a language syntax feature and more of a code style enforcement paradigm.
Good lsp support makes it mostly fine imo.
Not being forced into other people's style choices is a really nice boon to me.
That's the real problem
The way that modern languages force a single style is great, and it's a big strike against nim, which is an otherwise nice language.
What you can't do is tell your IDE to interpret camel-case as snake-case if you want (or vice versa), just because this package you really need uses camel-case and you want to use snake-case.
There's options to turn it off, options to turn it into a warning when you have style issues so you can make them consistent and it prevents similar names that shouldn't exist in the first place by causing compiler errors (if you have is_ok you should not have isOk in the same scope, what are you doing). It is just not a big deal, at all. And as stated, it is not hard to ensure consistency within your codebase by heeding compiler warnings/errors.
That's your take? I can see a couple of actual nim users complaining, the rest are some randos that tried to derail any productive discussion with "I have an old C library that uses three different styles for init, how would I bind it to Nim?" and although a bunch of workarounds exist, they were too loud and stubborn. For me it showed that most nimmers prefer style insensitivity as an option, although they don't use it in the same project.
I do agree that this is a red flag decision.
If you use choosenim to install Nim several executables get built/downloaded along with the compiler:
$ pwd && ls
/Users/me/.nimble/bin
choosenim nim nim-gdb nimble nimgrep nimpretty nimsuggest testament
https://github.com/dom96/choosenim#readmehttps://nim-lang.org/docs/manual.html#lexical-analysis-ident...