Hello! I am new to the Nim community. I have worked with C++ before, and Rust is my main language. I found Nim when looking for another language to learn. I'm really excited by the idea of supporting a productive open source language

I will probably use Nim for games and network programs, and I have a few questions about the language:

  • Where is Nim in regards to stability of coding convention? What I mean by this is, if I write a library today, will it be completely obsolete or compile a year or two for now? I am accepting and excited for minor upgrades in features, but I just want to make sure that my code isn't going to "rot" simply because the language evolved without it
  • Should I use the new "this" argument insertion? I didn't see this in the tutorial (yet?) but I found it in the manual. It requires a module-level pragma, {.this: self.}, and I like the looks of it. Is it idiomatic and stable for use now, assuming that when it's done I can just remove the pragma?
  • Should I use "concepts"? They remind me of Rust traits, which I like to use to streamline code and create bounds on generics. In Rust, they are necessary to support user-defined deep copy operations of a type in a generic container, for example. How stable are they, and are they yet to undergo a total overhaul?

I am really thrilled to find another useful language, and I hope that I can be helpful in this friendly community.

Thanks!

2017-12-06 21:33:11

if I write a library today, will it be completely obsolete or compile a year or two for now?

In my opinion, yes, based on other stuff programmed in nim that has not received updates in a year. But it might happen that in a year nim reaches v1.

Should I use the new "this" argument insertion?

I think Araq wants to make it the default.

Should I use "concepts"?

Yes. You will find bugs, but that's the only way to progress. In the past they used to be more limited and bugged, but recently got an overhaul.

2017-12-07 11:17:35

if I write a library today, will it be completely obsolete or compile a year or two for now?

In my opinion, yes, based on other stuff programmed in nim that has not received updates in a year. But it might happen that in a year nim reaches v1.

I disagree. Here is some proof: a library I've written a LONG time ago, compiles perfectly: https://github.com/dom96/nim-jsonrpc. Sure it's not large but it proves something. Despite Nim being pre-v1 we do make an effort not to break things.

And v1 is indeed around the corner.


As for the features you've mentioned, I personally don't use either of them. Feel free to use them but beware that they may be more buggy than the rest of the language.

2017-12-07 14:42:17
Awesome, thanks! I'll take precaution with unstable features, but otherwise that's encouraging
2017-12-07 19:17:42