You also have to read others' code, as well...
Try having a variable signon and a variable signOn. Or two functions with the same type signature, one called signon() and one signOn() (for example, imported from two different modules).
Yes, let's generalize - reading the blog and the comments, this "case sensitivity ruins productivity"-problem seems to only be a problem in scripting languages.
I would see
use foo::signon;
use bar::signOn;
clearly, if I have to import this in my own file I should be VERY careful about those two functionsor rather, I'd import from foo, but I'd use the namespaced version from bar
so `signon` would be `foo::signon`, but `bar::signOn` would be written out fully to avoid this kind of clash
Here's how you declare a binding:
let signOn;
let signon;
I seriously hope you don't declare both of these in the same scopeThe feature is not meant to encourage developers to use "my_cat" and "myCat" randomly within the same file.
And its worse, especially when the variables aren't "foo_bar" and "foo_Bar", but, say, "cycle_often" and "cycle_of_ten".
Such an error is caught by the compiler.
const cycle_often = 10
var cycle_of_ten : float
ambig.nim:2:5: Error: redefinition of 'cycle_of_ten'I'm sure it's not, but it isn't doing a thing to discourage that. We stopped using case insensitive file systems a long time ago, didn't we?
Windows didn't.
But even Windows doesn't use an underscore-insensitive file system.
Treating them as the same creates more danger -- the danger that the programmer intended them to be different, but the language treated them the same -- rather than mitigating danger.