Not hard to make up any number of examples where spacing or capitalization matter for good reason. They matter to humans; its just silly to make them not matter to the compiler.
Now back to your concern of identifiers being read in different ways meaning different things. Once you know that this will be an issue you tend to think about it when naming your variables, and so it tends to not really be an issue. The thing is that once you get used to it you know that `pidTarget` and `pIdTarget` is the same thing, so you either relax you expectations, or you don't construct your names with this ambiguity. And besides, a "pointer to a target id" and a "scalar process id" probably don't share the same type, so the compiler should be catching that anyways if you ever used it wrong.
grep -i solves the case issue, and grep/ripgrep probably _should_ have a feature to ignore _ ; in which case you will be able to use them - but until then, nimgrep will do that work.
I don’t know how atheistic style looks, but Nim is style agnostic - everyone can practice their religion and they all get along. C, Python, and the real world - not so much.
This one point is always worth considering when deciding on user-facing portions of technology.
Not to mention, in my opinion it's more aesthetically pleasing, but that's just me :)
(let ((|hello world| 3)
(|HELLO world| 4)
(|こんにちは (jp)| 5)
(|pi\|pe| 'piped)
(|newlines
work
too| 6))
(list |hello world| |HELLO world|
|こんにちは (jp)| |pi\|pe|
|newlines
work
too|))
; --> (3 4 5 PIPED 6)Search HN (box at bottom of page) for Perl6 and you will find many articles with references to kebab-case.
As mhd said, it's used in Lisp too.
But is not a deal breaker for me. If the language doesn't let me I can use `ii` or `i2` or whatever.
Please notice that the first letter in Nim is case-sensitive, so `I` != `i`, and you can continue use your conventions.
And before some new comment starts bashing that, I think this is a must so you can differentiate your types, written in PascalCase, from your variables, written in camelCase.
I did not know this about Nim and does also seem quite a big turn off and a bit of a WTF decision
I have never coded any Nim, just read about it though :)
I guess the intention is NOT to let you carelessly use Myvar, MyVar and myvar willy-nilly in your code, as I had first imagined
I assume the intention is to PREVENT you from deliberately defining those names as different vars, which would be confusing
So, on reflection, maybe it is not such a WTF
I feel like this is mentioned (by the people who just glance over Nim) every time there is some discussion about Nim, and IMO it is blown way out of proportion.
In my cca year and half of using Nim, I not even once had a problem with the style insensitivity.
IMO, you (general you) shouldn't use `my_foo` and `myFoo` for different things, regardless if a language allows for it or not.