Hacker News new | ask | show | jobs
by jarredkenny 306 days ago
I fell in love with Nim a couple of years ago, but feel like Zig gaining popularity has really pushed Nim out of the limelight in terms of developer adoption.
1 comments

Nim has been on my radar for a while, but I've never really dug into it. I have actually written some small projects in Zig though. Are there things you think Nim does better than Zig?
I think Nim and Zig target very different audiences and have very different goals. Nim is about being a big, powerful language with lots of features, so that you have the freedom to use it the way you want, e.g. there is OOP with methods, but it's completely optional. Zig is explicitly against that, even on the homepage you can see: "No hidden control flow. No hidden memory allocations. No preprocessor, no macros.". While memory management in Nim by default is completely automatic, and templates/macros are quite common.

It makes much more sense to compare Nim to, say, Swift, D, or other modern compiled languages with lots of syntax sugar.

You may consider Nim as a sort of "compiled Python" with some Pascal influences.

https://nimble.directory/ I'd pick Nim if my concern is general app development, not specifically system programming.