Live data from Hacker News

Nim version 2.0.0 release candidate

nim-lang.org

21–30 of 121 posts

Re: Nim version 2.0.0 release candidate

#21

among nim, zig and rust, I'm most likely to learn nim, it has been there for a while and it is solid and has so many good stuff in it, it just needs more 'marketing'. in particular, python really should help its popularity as their syntax are similar and both are very expressive.

Is syntax really that big of an obstacle to learning a first programming language? The semantics of a C-like language like Nim could hardly be more different to Python's, they're pretty much at opposite ends in the stack.

Nim feels much more like python than c to me, and the minimal number of non-alphanumeric characters in source is a big part of that.

Re: Nim version 2.0.0 release candidate

#22
post #10

I was hoping case sensitivity would be implemented but it seems like it was too controversial. I'm thinking at this point there might be too much resistance.

I didn't know this existed. There's a lot I like about Nim, but total rejection of tab indentation, and now this style insensitivity thing, mean that for me personally, Nim will just stay an interesting language I see on HN from time to time.

Re: Nim version 2.0.0 release candidate

#24
post #23
post #10

I was hoping case sensitivity would be implemented but it seems like it was too controversial. I'm thinking at this point there might be too much resistance.

John Carmack has a take on it; https://twitter.com/ID_AA_Carmack/status/1592560938208710659...

I think I agree with Carmack on this. I'm hyper aware of case now, but this was probably the major cause of errors for me when learning (didn't help that tooling was less good then, so there were no linters pointing out my errors).

Re: Nim version 2.0.0 release candidate

#25

I am pleased to see a language that focuses on good multithreaded support. I tend to use Java and C for multithreaded problems but having the availability of Nim which looks similar to Python is really promising.

If you want good multithreaded support and don't care much about ensuring perfect thread-safety at all times, you can't beat Go for real-world use.

Yes I like Go but I am yet to do any professional development in it.

Go is a M:N scheduler with M kernel threads and N lightweight threads

I wrote a 1:M:N lightweight scheduler which preempts hot loops. I don't know when Golang preempt goroutines outside of a channel send - I believe it's in stack growth or in other words when a method is called.

My userspace scheduler preempts while true and for loops by setting the looping variable to the limit.

I wrote it in Java, C and Rust.

https://GitHub.com/samsquire/preemptible-thread

Does anybody know if Nim loop variables can be easily mutated from another thread?

It looks they cannot

Re: Nim version 2.0.0 release candidate

#26
post #10

I was hoping case sensitivity would be implemented but it seems like it was too controversial. I'm thinking at this point there might be too much resistance.

I've come to increasingly accept it over time? I mean, I'd really like it if my_function() and myFunction() just weren't allowed in the same section of code but if you allow the user to have both it's probably better that they refer to the same function than different functions.

It is a strange feature but it does have a good underlying idea.

Why would having two functions, named makeFile and make_file in the same program ever be a good idea?

Think of it as less of a language syntax feature and more of a code style enforcement paradigm.

Good lsp support makes it mostly fine imo.

Re: Nim version 2.0.0 release candidate

#27
post #10

I was hoping case sensitivity would be implemented but it seems like it was too controversial. I'm thinking at this point there might be too much resistance.

It's one of those things that, as a Nim hobbyist programmer, I think is a neat feature to have, but I could see being a big hesitation for use in professional environments.

Re: Nim version 2.0.0 release candidate

#28

among nim, zig and rust, I'm most likely to learn nim, it has been there for a while and it is solid and has so many good stuff in it, it just needs more 'marketing'. in particular, python really should help its popularity as their syntax are similar and both are very expressive.

[deleted]

Re: Nim version 2.0.0 release candidate

#29
post #10

I was hoping case sensitivity would be implemented but it seems like it was too controversial. I'm thinking at this point there might be too much resistance.

I've come to increasingly accept it over time? I mean, I'd really like it if my_function() and myFunction() just weren't allowed in the same section of code but if you allow the user to have both it's probably better that they refer to the same function than different functions.

It's not so much that anybody thinks that mix is a good idea, but it's just what happens immediately in any C/C++ codebase if you're using any nontrivial combination of libraries at all. The feature is about providing consistency, not ignoring it.

Re: Nim version 2.0.0 release candidate

#30
post #10

I was hoping case sensitivity would be implemented but it seems like it was too controversial. I'm thinking at this point there might be too much resistance.

It's apparent from the RFC discussion that there is no consensus on the topic. With little (proven) tangible benefit of making the change, and a large potential for backlash within the small existing community, I'm not certain it's worth the risk for Nim to make this move. https://github.com/nim-lang/RFCs/issues/456

Anyone who wants to use grep will just keep ignoring nim. Case insensitivity is pretty silly, and underscore insensitivy is just really silly.

The way that modern languages force a single style is great, and it's a big strike against nim, which is an otherwise nice language.

Post reply on HN