Question (genuine, not trolling): what's the use-case for Nim regarding other languages? What are its pros/cons?
Nim 1.0
51–60 of 308 posts
Re: Nim 1.0
#52Question (genuine, not trolling): what's the use-case for Nim regarding other languages? What are its pros/cons?
At first blush, it's easy to describe Nim as C-flavored Python, but I'm not sure that quite captures it. The syntax is similar, but that's about where the similarities end - Python is deeply, fundamentally a dynamic language, and Nim one of the more firmly statically typed non-functional languages out there. You could also describe it as being competitive with Rust, but with more compromises for the sake of developer…
Re: Nim 1.0
#53Shameless plug, but by a nice coincidence, Manning has a discount on all printed books today. Among them is my book, Nim in Action, available for $25. If you're interested in Nim it's a great way to learn :) It was published in 2017 but we've ensured Nim is compatible with it (all book examples are in Nim's test suite), so apart from some minor deprecation warnings all examples should continue to work. Grab a copy he…
Re: Nim 1.0
#54Earlier quoted context omitted.
It's interesting to hear the constraints the language developer wanted from the beginning (20k lines, macro system drives most of the language development) and the various compromises they had to make along the way. > Furthermore, we don't really know yet how to leverage a macro system in order to give us extensibility on the type system level, so Nim's core needed generics and constraints for generics. I'm curious t…
I haven't looked into Nim in as much detail as Rust (though I did make some contributions to the compiler/language a number of years ago), but one aspect that has always seemed notable to me is that it seems to defer type checking of generic code until it is instantiated (this is what happens in C++), so these functions will all typecheck until you actually try to use them: proc foo[T](): float32 = result = "foo" + 4…
Worth noting that C++ is going the opposite way with concepts. The compiler still won't enforce that `template void foo(T t) { t++; }` needs a `requires Incrementable T` (like Rust would require with trait bounds). But if `foo` does use the concept `template`, then a call like `foo(S{})` will raise an error at the callsite, not at the `t++` line.
Re: Nim 1.0
#55Earlier quoted context omitted.
It's as easy as Python and as fast as C. That was my take when I looked at it and bought the book last year.
> as fast as C I mean, it actually is C, since the code is transpiled to C.
Re: Nim 1.0
#56Question (genuine, not trolling): what's the use-case for Nim regarding other languages? What are its pros/cons?
Those are valid questions when evaluating an unknown technology. How could anyone consider this trolling? Not to digress but have we become too sensitive?
(I'm not accusing the granparent post)
Re: Nim 1.0
#57version 1.0, stability, RFC process -- all are signs of maturing language and the ecosystem.
Here is a curated list of frameworks for Nim
https://github.com/VPashkov/awesome-nim
For me, personally, the interest, is its javascript-as-target capabilities.
Re: Nim 1.0
#58Re: Nim 1.0
#59Congrats guys!!! This has been much-anticipated and I'm very excited. I personally wish that the owned reference stuff ( https://nim-lang.org/araq/ownedrefs.html ) had been part of 1.0, but I think that at some point shipping 1.0 >> everything else. I've been following (and evangelizing) Nim for a while, this will make it easier to do so.