News for hackers. Stuff that matters.
Re:Exploring Rust (from C#) by bryanlarsen on Wednesday March 23, 2016 @12:33PM (#11345942)
Sure, it's a misfeature, IMO, but it's certainly not a reason to write off the language.

No matter what language you use, if you have two variables named myVariable and my_variable in the same scope, you've created a huge land mine in your code, and your linter should complain. Eventually somebody's going to come along and mix the two up.

The fact that nim blows up differently than every other language just makes it more obvious that this is something you just shouldn't do.

Re:Exploring Rust (from C#) by gjm11 on Wednesday March 23, 2016 @01:15PM (#11346365)
Yup, having myVariable and my_variable is asking for trouble in any language, and what bothers me about Nim is not at all that it makes that harder.

What bothers me about Nim is that (1) it makes it easier for you to call the same variable myVariable in some places and my_variable in others because that won't make compilation fail; (2) once that happens it becomes harder to find references to that variable, because the usual searching tools will miss some of them (and you will not necessarily get any indication that you've missed any); and (3) there are -- hopefully rare, I concede -- cases where what in another language would be obviously and innocuously different identifiers collide. nOpenFiles versus no_pen_files. use_rsync versus user_sync.

And what does this buy you? What is the advantage it confers? That you have the flexibility to call the same thing myVariable in some parts of your code and my_variable in others. But that's a terrible idea and making it possible is not a feature.

Re:Exploring Rust (from C#) by greydius on Wednesday March 23, 2016 @01:25PM (#11346445)
> if you have two variables named myVariable and my_variable in the same scope

But that's not the situation in the example. user_sort and use_RSort are perfectly fine identifiers that no reasonable person would expect to be interpreted as the same.

Re:Exploring Rust (from C#) by progman on Wednesday March 23, 2016 @07:25PM (#11349204)
Such a conflict can be resolved easily by qualification (a.user_sort and b.use_RSort). What's the problem?