3 ms·
I suggest you think of Nim as of a better Go - more ergonomic, easier to start being productive in, faster, giving more control if necessary (by descending into
by ZoomZoomZoom 4y ago
I suggest you think of Nim as of a better Go - more ergonomic, easier to start being productive in, faster, giving more control if necessary (by descending into the unsafe territories of manual memory management, `emits` and such), more portable, suitable for workstations and embedded alike.
Zig is definitely not that. And I understand the description above misses the downsides of a small community and not the strongest ecosystem.
- anta40 4y agoI learnt a bit of Nim few years ago, but haven't continue it. My understanding so far is unlike Go, Nim doesn't have concurrency built into the language/runtime?
- auxym 4y agoHopefully it should get better soon-ish, but concurrency (and even parallelism aka threads) unfortunately is probably Nim's weakest point at the moment. On the good side, compared to go, Nim's interop with C is fully transparent (since Nim uses C as a backend). This means easy access to C libraries, but also makes it very appropriate for embedded targets like microcontrollers (especially with its ARC memory-management system, which is static/deterministic automatic reference counting).
- ilaksh 4y agoOf course it does.
- 0cf8612b2e1e 4y agoI think it is a stretch to compare Nim and Go as anything other than statically compiled languages. Nim is the anti-Go with every possible programming paradigm inside the language.
- ZoomZoomZoom 4y agoThe implementation details and the development ethos differ, but from the pragmatic point they compete, offering higher abstraction level over C. Moreover: - Both took some inspiration from languages of Wirthian family. - Both promise easy onboarding, high readability and high productivity. - Both rely on automatic memory management by default. On the other hand, I agree that Nim feels and functions totally different while offering much more possibilities. You can definitely call Nim the anti-Go, but it doesn't negate the fact it could absolutely shine in the same domains, at least with a bit more love, attention and funding.
- Mikeb85 4y agoBut they're both statically typed GC languages that compile to native binaries. Versus Zig which has no GC and is more akin to C, Rust, Ada, that sort of thing...
- goodpoint 4y agoWith ARC Nim is also very akin to Ada and Rust: https://nim-lang.org/blog/2020/10/15/introduction-to-arc-orc-in-nim.html https://nim-lang.org/blog/2020/10/15/introduction-to-arc-orc...
- Mikeb85 4y ago> ORC is Nim’s all-new cycle collector based on ARC. It can be considered a full-blown GC since it includes a local tracing phase (contrary to most other tracing GCs which do global tracing). ORC is what you should use when working with Nim’s async because it contains cycles that need to be dealt with. From that blog post. Nim is great but it's more Go and less Rust...
- goodpoint 4y ago> more Go and less Rust Not at all, it does not have a runtime with a built-in thread pool and channels like Go.