News for hackers. Stuff that matters.
Re:Nim Programming Language 0.11.0 released by federico3 on Thursday April 30, 2015 @02:22PM (#9466736)
Safety! Having "my_cat" and "myCat" as different variables in the same space sometimes ends up with using the wrong variable, especially when using tab completion.

The feature is not meant to encourage developers to use "my_cat" and "myCat" randomly within the same file.

Re:Nim Programming Language 0.11.0 released by dragonwriter on Thursday April 30, 2015 @06:21PM (#9468020)
Safety might prohibit different identifiers with a certain degree of similarity, but it wouldn't treat different-but-similar identifiers as if they were the same.

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.

Re:Nim Programming Language 0.11.0 released by krupan on Thursday April 30, 2015 @02:56PM (#9466931)
"The feature is not meant to encourage developers to use 'my_cat' and 'myCat' randomly within the same file."

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?

Re:Nim Programming Language 0.11.0 released by federico3 on Thursday April 30, 2015 @03:49PM (#9467234)
...actually we didn't.
Re:Nim Programming Language 0.11.0 released by dragonwriter on Thursday April 30, 2015 @06:19PM (#9468012)
> 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.

Re:Nim Programming Language 0.11.0 released by msie on Thursday April 30, 2015 @02:39PM (#9466844)
I don't like the idea of a language encouraging sloppy coding.
Re:Nim Programming Language 0.11.0 released by federico3 on Thursday April 30, 2015 @03:42PM (#9467191)
This is not different than having foo_bar and foo_Bar as two different variables.
Re:Nim Programming Language 0.11.0 released by dragonwriter on Thursday April 30, 2015 @06:23PM (#9468027)
Well, yes, it is.

And its worse, especially when the variables aren't "foo_bar" and "foo_Bar", but, say, "cycle_often" and "cycle_of_ten".

Re:Nim Programming Language 0.11.0 released by progman on Friday May 01, 2015 @02:47AM (#9469881)
> "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'
Re:Nim Programming Language 0.11.0 released by dkersten on Thursday April 30, 2015 @03:06PM (#9466991)
I'd rather have them be different identifiers but with a compiler warning if they're found in the same file.
Re:Nim Programming Language 0.11.0 released by rat87 on Friday May 01, 2015 @01:40AM (#9469701)
Sometimes the best name for a variable is a variation of the associated class/function name.