4 ms·
I would say that Nim ticks all of the main things you are interested in. To give you a better idea let me go into a bit more detail about your interests: > I w
by dom96 8y ago
I would say that Nim ticks all of the main things you are interested in. To give you a better idea let me go into a bit more detail about your interests:
> I want to write once and run on Windows / Linux / Mac. (I'm not writing a GUI.)
Portability is Nim's great strength. You can even target some really obscure platforms, as long as they have a C compiler (which they likely will).
> Concurrency and async capabilities
Concurrency in Nim is offered via async await with first-class support for Windows, Linux and macOS (IOCP, epoll and kqueue). It's implemented 100% using Nim's macros, so you can easily dive into its implementation and modify it to suit your use case without having to mess with the compiler source code. It's all implemented in the standard library.
Nim's async has also been used in production for quite some time now. One example is the Nim Forum: https://forum.nim-lang.org https://forum.nim-lang.org.
> Safety guarantees (both types and threads)
Parallelism in Nim is a little different than in other languages. Each thread has its own GC and memory sharing between threads is limited. This ensures safety and performance (no stop-the-world GC).
> Speed
Out of all the language's you've mentioned I would say that they are all pretty similar in terms of speed.
Hope this helps!