3 ms·
I'd say that's only mostly true - if you had a typo, and wrote "camelcase" instead of "camelCase" in just one place out of a hundred, you might not notice it, b
by beagle3 8y ago
I'd say that's only mostly true - if you had a typo, and wrote "camelcase" instead of "camelCase" in just one place out of a hundred, you might not notice it, but it will compile, and not match a grep (though it will match nimgrep). This case could be solved by "grep -i" or equivalent, but not the camelcase vs. camel_case case.
This is not criticism; I prefer Nim's mostly-case-and-underscore-insensitive approach, but I think this is a pitfall that should be acknowledged and taken into account (which is quite easy to do given the included nimgrep).
Perhaps it makes sense to have an optional warning in case a name is inconsistently spelled inside the same compilation unit.
- nimmer 8y ago> if you had a typo, and wrote "camelcase" instead of "camelCase" in just one place out of a hundred There are already formatter tools that check for that. Also, any editor with completion will suggest the right form every time preventing the bug.