News for hackers. Stuff that matters.
Re:Nim Community Survey 2021 Results by k__ on Sunday January 16, 2022 @08:58AM (#29956009)
I like the lifetimes, the traits, the pattern matching, but also that it's used by more people, yes
Re:Nim Community Survey 2021 Results by arc776 on Monday January 17, 2022 @06:50PM (#29973061)
Thanks for your reply.

It's interesting to know what the perceived weaknesses and strengths are. Nim does have pattern matching but it's rarely used, whereas it seems to be used a lot in Rust (probably because of the prominence of enums). Nim has static lifetime management, but it's mainly used for eliding and thread safety (for now). Traits are an interesting feature, and make a good example of why I'm so bullish on Nim: someone has already replicated them with a macro: https://github.com/haxscramper/nimtraits

The popularity critical mass thing is mainly getting eyes on the language, but I think Nim has a slight advantage in that it's incredibly cooperative with its compile targets and FFI. Like Python, it's great for good glue code and 'scripting' without the performance penalty, and I hope that helps it meld into people's toolboxes over time.

Re:Nim Community Survey 2021 Results by cb321 on Sunday January 16, 2022 @11:20AM (#29957237)
Nim's concepts [0] are sort of like Rust's traits or Haskell's typeclasses - maybe more expressive in some ways. Pattern matching can be added on as a simple library and has been done several times, maybe most pedagogically outlined here [1]. Lifetime annotations just seem unproductive to me. Nim with ARC/ORC does have safe [2], automatic memory management without "a GC" or need for lifetime annotations.

[0] https://nim-lang.org/docs/manual_experimental.html#concepts

[1] https://nim-lang.org/blog/2021/03/10/fusion-and-pattern-matc...

[2] https://uploads.peterme.net/nimsafe.html