News for hackers. Stuff that matters.
Re:Nim Programming Language 0.11.0 released by iopq on Thursday April 30, 2015 @05:42PM (#9467846)
The convention is that upper case is types, lower case is variables. So you'd have to try hard to make that mistake.
Re:Nim Programming Language 0.11.0 released by rbehrends on Thursday April 30, 2015 @06:10PM (#9467972)
That has nothing to do with types vs. variables.

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).

Re:Nim Programming Language 0.11.0 released by kibwen on Thursday April 30, 2015 @08:14PM (#9468498)
By default, the Rust compiler warns you when you use uppercase characters in variable and function identifiers. The community overwhelmingly adheres to this style. Rust is also extremely strongly-typed, so not only would you have to be willfully disabling the style warnings, you would have to have to manage to give them the same types, and furthermore given the nature of Rust code it's rather possible that you'll still get a compilation error due to using a variable in a way that it didn't expect. You also can't "accidentally" introduce new variables in Rust, as you can in Python via typos.
Re:Nim Programming Language 0.11.0 released by rbehrends on Thursday April 30, 2015 @09:48PM (#9468899)
Yes, enforcing case strictly via style guidelines that prevent mixing of upper- and lowercase is another way of avoiding that problem (underscores can still trip you up in a similar fashion, of course, e.g. signon vs. sign_on). I'm still not sure how the discussion got sidetracked into discussing Rust, though.
Re:Nim Programming Language 0.11.0 released by Dewie3 on Friday May 01, 2015 @04:16AM (#9470104)
> I'm still not sure how the discussion got sidetracked into discussing Rust, though.

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.

Re:Nim Programming Language 0.11.0 released by iopq on Thursday April 30, 2015 @08:25PM (#9468563)
You'd have to declare both of them in the current module. That's why I don't do glob imports.

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 functions

or 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

Re:Nim Programming Language 0.11.0 released by rbehrends on Thursday April 30, 2015 @09:44PM (#9468886)
I'm really not sure what the point of referencing Rust is. This was about programming languages in general, and the post I was referring to was about C#. Also, importing is an example, another example would be accidentally declaring a second variable in the same module (should not happen, but people make errors), or a number of other situations where two identifiers that are identical except for case end up in the same scope.
Re:Nim Programming Language 0.11.0 released by iopq on Saturday May 02, 2015 @09:32PM (#9479393)
I'm referencing Rust because I'm working on a Rust project right now. I don't even know C#.

Here's how you declare a binding:

    let signOn;
    let signon;
I seriously hope you don't declare both of these in the same scope