News for hackers. Stuff that matters.
Re:Nim Programming Language 0.11.0 released by def- on Thursday April 30, 2015 @12:01PM (#9465903)
Yes, Nim still uses partial case insensitivity: http://nim-lang.org/manual.html#identifier-equality

I agree that it's a problem with grep, there's a nimgrep tool that you could use instead, but I don't.

The nice part about it is that you can use a consitent naming convention even when using external libraries.

My idea to solve the problems this causes without removing it would be a gofmt like tool as described here: https://github.com/Araq/Nim/wiki/GSoC-2015-Ideas#nimfmt-auto...

Re:Nim Programming Language 0.11.0 released by gtaylor on Thursday April 30, 2015 @12:12PM (#9465961)
Is there any way to disable this behavior? I've been curious about Nim, but this makes me cringe pretty hard. I get the intention, but this is exactly the kind of magic that I dislike.
Re:Nim Programming Language 0.11.0 released by wtetzner on Thursday April 30, 2015 @02:40PM (#9466848)
> The nice part about it is that you can use a consitent naming convention even when using external libraries.

I think a slightly nicer (in the sense that it would catch more typos) way to do it might be to specify the naming convention at the top of the source file, and have the compiler enforce that naming convention within the file.

Maybe also have a way to set it in the build system, so it could enforce it for the whole project. That way your project is consistent, but the libraries you rely on don't have to match your conventions.

Re:Nim Programming Language 0.11.0 released by Retra on Thursday April 30, 2015 @04:35PM (#9467473)
I was about to say the same thing (about enforcing the convention directly.) But there's a problem. Let's say I write a function called `HTTPHeaderScan()`. Someone else might have used `HttpHeaderScan()`. Or worse: `HtTpHeAdErScAn()`. How do you enforce one over the other? If you said "everthing must be CamelCase," how do you know that the name is wrong?
Re:Nim Programming Language 0.11.0 released by rat87 on Friday May 01, 2015 @01:30AM (#9469661)
Assuming you have a consistent naming scheme for your language I'd assume this would be mostly used to call libraries written in other languages
Re:Nim Programming Language 0.11.0 released by msie on Thursday April 30, 2015 @01:34PM (#9466450)
Oh god, this is so horrible. I've never seen this in the many languages I've used and consider all the programmers happily using those languages without this "feature". Please kill this feature now while the language is still relatively young.
Re:Nim Programming Language 0.11.0 released by Scramblejams on Thursday April 30, 2015 @04:39PM (#9467501)
Your comment made me wonder if this feature was conceived as a red herring just to keep people from going on about significant whitespace. :-)

If I ever design a language I might have to remember that.

Re:Nim Programming Language 0.11.0 released by jessaustin on Thursday April 30, 2015 @04:55PM (#9467592)
Ha! Great idea. Significant whitespace is a good thing. "partial case insensitivity"? KIWF! Or at least let it be overridden via configuration flags.
Re:Nim Programming Language 0.11.0 released by krupan on Thursday April 30, 2015 @12:21PM (#9466031)
I haven't used go or gofmt, but I don't quite understand the appeal. gofmt doesn't go both ways, right? You can't write go in one style and then gofmt it to share, and then un-gofmt it back to your preferred style, right? Seems like it would still be easiest to just get comfortable writing and reading in the style gofmt produces. At that point, gofmt is just for catching little mistakes, which, maybe the compiler could just do for you. I see python and nim's significant whitespace as a step in that direction. Why not have the compiler/interpreter enforce a certain number of spaces for indentation? Why not enforce a certain naming style?
Re:Nim Programming Language 0.11.0 released by kej on Thursday April 30, 2015 @12:51PM (#9466201)
>Seems like it would still be easiest to just get comfortable writing and reading in the style gofmt produces.

That's the entire point of gofmt. Like many of Go's design choices, it's there to subtly (or not so subtly) encourage doing things in one consistent way.