12 ms·
Why Nim?
- yapyap 1y agooh nim nim nim nim nim fucking nim
- liampulles 1y agoI think languages that favor an "expressive" syntax, which favor using and building syntactic sugar and macros, suffer from a nicheness problem. That is they are going to have to appeal to people who want that style of programming, and they have the additional hurdles of A) having more stuff one has to learn to use the language, B) dealing with a community of people who all want the magic from their previous language ecosystem imported into this new one, and C) the additional burden on libraries to come about which use these features. Note: I have not used Nim, so please take the above with a lump of salt.
- TylerE 1y agoI've used nim a bit and am going to push back quite hard on this. The core of the language is really quite consise. No harder of a mental overload than say go, or python. I'd also argue that high expressiveness actually allows you to avoid magic. The actual library implementations are rarely very scary. We're ahead of time compiled and type checked so it's not like some rails codebase where a clockwork goblin can just explode out of nowhere.
- liampulles 1y agoThats good feedback, thank you.
- TylerE 1y agoMacros in general are actually hugely anti-magical things because they let you push what normally be runtime checks into the compiler which not only means you get to fail fast but (if your language tooling is decent) means you actually get sane error messages instead of a traceback nested 1000 function calls deep or something.
- cb321 1y agoI would also push back (agreeing with @TylerE, but linking in this part of the subthread seems best). It all depends, but sometimes macros change the division of labor between library authors and library users so that they specifically have to learn less. For example, https://github.com/c-blake/cligen https://github.com/c-blake/cligen makes it so that you don't really have to learn an "API" to roll a nice CLI on top of a procedure. You just need to learn literally 2 or maybe 3 names: "cligen", "dispatch", and maybe "help={}". Everything else, you already know from knowing Nim basics (or even Python basics). (The dispatchGen macro itself is rather a monster of static introspection and code generation and not at all pedagogical -- mostly from filling like 100 user requests on closed issues.) It's just important to keep in mind that library / framework authors, library / framework users, and final end users are not all the same person or even type of person. Metaprogramming enables the first group the most, but can deliver benefits to the latter two groups by easing their lives quite a bit. This is easy to lose track of in a niche language like Nim where all 3 groups might well be the same human for most of the life of some project. This partly also relates to how much of a "full stack debugger (of either correctness or performance or both)" personality one has. Then there are even more layers -- like all the levels in the language / compiler itself down to the CPU and beyond (such as "u-code" & micro-architectural resource sharing). What macros mostly do is enable fluid, simple syntax for things either too rare, too niche, too unanticipated or too disagreed upon to be in "the main language", whatever that is. As a shibboleth (or marker for group inclusion), the existence of this expressivity selects for programmers who want to fix rare, niche, unanticipated or disagreed upon things, and these people can be even harder "cats to herd". Nim has other very flexible features - such as the rare "user-defined operators" that enable very nice looking custom syntax. But you can also SCOPE their use very simply. E.g., put their definitions inside a template so that you can say `ptrArithmeticNow: expression` and only have pointer arithmetic within `expression` (maybe with +! to look a little diff from ordinary arithmetic), and (ptrArithmetic itself can be scoped within a module name). It also has even more powerful (and more rare) term-rewriting macros, used most commonly in Lisp systems, perhaps doing computer algebra.
- jarredkenny 1y agoI 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.
- Zambyte 1y agoNim 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?
- Tiberium 1y agoI 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.
- deleted 1y ago[deleted]
- anta40 1y agoYou may consider Nim as a sort of "compiled Python" with some Pascal influences. https://nimble.directory/ https://nimble.directory/ I'd pick Nim if my concern is general app development, not specifically system programming.
- mathverse 1y agoNim is a programming language for an expert programmer. The ecosystem is very small and for everything a little bit more specialized you need to make a library yourself.
- amai 1y agoNowadays you could let an AI vibe code all libraries you need.
- raffraffraff 1y agoThis. I really wanted to like Nim. I tried to learn it, but having never been a programmer before (but years of Linux admin, puppet, terraform and scripting) I found it extremely tough, and a lot of documentation is out of date and the there aren't many good examples to follow. Switched to Go and have built lots and lots of stuff in go.
- ZoomZoomZoom 1y ago> a lot of documentation is out of date Please, file bugs or complain on the official matrix room. The community tries its best to keep up the official documentation in sync with the changes. https://matrix.to/#/#nim-lang:matrix.org https://matrix.to/#/#nim-lang:matrix.org
- Imustaskforhelp 1y agoExactly, I had tried nim but I felt the same issue. I mean, personally I really like golang. Its actually gotten an ecosystem that functions while being able to cross compile and actually being easy enough to learn unlike rust. I also sometimes exclusively just use typescript/python just for their ecosystem as a junior programmer. For me ecosystem matters a lot and this was a reason why I wish that more languages can create more libraries which can work. Like the article pointed, nim is really solid language. But I'd like to see more libraries being made for it.
- andsoitis 1y agoWhen there's a vacuum like that, that is also an opportunity for folks to make a significant impact. Compare to other communities where you need to stand out from the noise.
- simonask 1y ago“Has safety features in place”? I’m sorry, not gonna cut it. I mean, Nim looks cool, but I’m not sure what it does that is substantially new. Niceties are generally not enough to foster adoption - something real has to be on the table that meaningfully opens up new avenues, unlocks new paths, enables new use cases. I have the same criticism of Zig.
- archargelod 1y agoNim has one of the most powerful metaprogramming systems out there. Hygienic templates, easy macros, but my favorite is the compile-time functions. Nim compiler has an embedded VM, so any Nim code (that doesn't rely on FFI) can run at compile time.
- simonask 1y agoI'm sure that's nice, but it's not a game changer. You can do metaprogramming in other languages as well, and maybe those languages get it not quire as right as Nim, but it's not enough to tip the scales.
- lionkor 1y agoMore powerful than zig's comptime?
- Tiberium 1y agoYes, compile-time execution in Nim is very natural, if you mark a variable "const" or use some other ways, you can run almost all pure-Nim code at compile-time without having to modify it.
- deleted 1y ago[deleted]
- xigoi 1y agoFor me, the killer feature of Nim is that I can just write code without having to constantly fight the language.
- rich_sasha 1y agoI often wonder why some languages succeed while others falter. Why did Rust break through, for example, while so many other excellent languages didn't. I guess a lot of languages are kind of fungible. If you want a fast, cross platform, GC-based OOP language, the truth is, there are many choices. I'm not saying they are the same, but for 80% of the use cases they kind of are, and there are always good reasons to use established languages rather than new ones. The ones that make it offer something very unique, not merely better than peers. So Rust, as a memory-safer non-GC language has a clear use case with little or no competition. Nim doesn't have this luxury. I wish it well, I like the language and often contemplated learning it properly. But I fear the odds are against it.
- rishav_sharan 1y ago> Why did Rust break through, for example, while so many other excellent languages didn't. Unfortunately, a lot of this is just enterprise sponsorship. Rust had Mozilla's backing. React had FB's backing, while Vue doesn't. And so on. There are of course, many other reasons as well, but to me this seems to be a critical one.
- hardwaresofton 1y agoI really feel for new languages that have to compete with Rust. It’s probably easier than it’s ever been to create a high quality new language but to get as good as Rust has become just takes so much time and collective effort that it can be out of reach for most ecosystems/groups of builders. Getting the language features just right (and including novel stuff) is just the beginning. Remember when Rust and Go were comparable? Feels like forever ago when they both just looked like “new systems programming languages” a we know how that turned out. For example Zig is probably the most impressive new language, and it’s got a ton of awesome stuff but the chance that I’m going to adopt it over a language with often comparable performance that is ALSO much safer? Rounds to zero. Maybe some day I’ll have the brain cells and skill to write code in zig and be confident I’m Not introducing a whole class of gnarly bugs, but it seems like I should just focus my limited brain power on writing high quality Rust code.
- 1y ago
- quotemstr 1y agoYou mean the language also known as NIM, n_iM, and NI_m?
- nmz 1y agoOne of the best features of the language IMO, no more style guides, do whatever you want.
- Tiberium 1y agoThe first character is actually not considered for case insensitivity, although it was in the past. :) And case insensitivity itself comes to Nim from Pascal.
- xigoi 1y agoBy this logic, C++ is the same as C, C# is a syntax error and PHP should be named $PHP :D
- otherme123 1y agoIMHO it is a good choice. You shouldn't have variables around that are different only on one cased character, or because one is snake_case and the other is camelCase. It also avoids the contamination of your code when using for example a C library in snake_case while your library uses camelCase. And finally, you can refactor a library in snake_case to camelCase without breaking dependent code.
- gyulai 1y agoSo, there I was in 2016. It had been 13 years since I had last entertained the desire to learn a new programming language (I had landed on Python, back then). The serious contenders were Go, Nim, and Rust. I landed on Nim back then, thinking to myself: Man, this language really has a future. I did my next side project in Nim, and loved it like I've loved no other language over the course of my (as of now, in 2025) 28 years of programming. But no actual job ever materialized to make me into a professional Nim programmer that would actually pay the bills. I stuck it out with Python, with growing discontentment. I took a Perl job in 2018, which lasted until 2022, which I never should have taken in the first place. I was relatively free in my choice of language from that point forward, and decided to switch from Python to Lua after a short period of disorientation where I kind of liked Haxe. Right now, I'm learning Rust, crying tears over that future for Nim that never materialized.
- Imustaskforhelp 1y agoHonestly, we can all still correct it if we really want to. Nothing is too late in my opinion, but the question that I wish to ask is, is it worth it? I mean, compared to zig which is starting to have a lot of hype and libraries / help, lets say that we now wish for nim to have this, then are the feature differences b/w zig and nim worth the revival of nim in that sense? (Pardon me if this doesn't make sense)
- ZoomZoomZoom 1y agoHad almost the same situation to a tee around the same time (~2014). Decided between Rust, Nim, D and Go. Went with Rust then and quickly felt it had been the right choice since it really helped me improving my skills and got me interested in programming again after a few years away from it. Rust community was way smaller and more approachable, the language felt exciting and really delivered on its promises. Then around 2019 Nim started to gain momentum (preparing for 1.0 release) and when I looked into it a bit deeper it became evident that for most of the code I usually write for myself Nim is just a more pragmatic choice than Rust. It gets me there faster. Zero job perspectives both times, scratched my own itch twice though. Glad I haven't gone with Go. Nim is not a perfect overlap with Rust, but it definitely covers everything Go can do and more and is a better design in my opinion.
- jopython 1y agoI would have used Nim if Go didn't happen.
- OutOfHere 1y agoGo is good, but sometimes you need higher performance, which is when one of Rust/Zig/Nim must enter the picture.
- efilife 1y agoSignificant whitespace is a dealbreaker for me. I never tried Nim for this reason
- krupan 1y agoHello, Python Critic from the 1990's. Welcome to the future
- codr7 1y agoHello fellow programmer from the middle ages; we discovered long ago that significant whitespace is a dead end, the fact that it's popular with the wannabes changes nothing.
- xigoi 1y agoI have just the thing for you ;) https://github.com/xigoi/nimdenter https://github.com/xigoi/nimdenter
- archargelod 1y agoI hated significant whitespace when I tried Python first time. Years later I found Nim and indentation didn't bother me as much. Maybe we both just got bad first expression with most popular, but unfortunately not a good language? =)
- 1y ago
- mrbluecoat 1y agoFrom a promotional marketing perspective, that webpage misses quite a few basics, like linking to the Nim site [0] and explaining what it actually does: Nim is a statically typed programming language that compiles to native dependency-free executables in C, C++ or JavaScript. [0] https://nim-lang.org/ https://nim-lang.org/
- treeform 1y agoI feel like Nim made me fall in love with programming again. Nim fixes many of the issues I had with Python. First, I can now make games with Nim because it’s super fast and easily interfaces with all of the high performance OS and graphics APIs. Second, typos no longer crash in production because the compiler checks everything. If it complies it runs. Finally, refactors are easy, because the compiler practically guides you through them. The cross compiling story is great you can compile to JS on the front end. You can use pytorch and numpy from Nim. You can write CUDA kernels in Nim. It can do everything. See: https://www.reddit.com/r/RedditEng/comments/yvbt4h/why_i_enjoy_using_the_nim_programming_language_at/ https://www.reddit.com/r/RedditEng/comments/yvbt4h/why_i_enj...
- felipeccastro 1y agoI agree with all your points but last I tried, the VS Code LSP was terrible. It’s hard to justify a new language when even the basics of autocomplete, inline errors and go to definition don’t work well. Part of the reason was that any function can be called on anything, which pollutes the autocomplete list. Has the LSP situation improved yet? Similar issue with Crystal lang, which I enjoy even more than Nim.
- elcritch 1y agoUnfortunately the LSP hasn’t improved that much. There’s been some work on to kill errant processes and such. So it’s a bit more stable. It does work pretty well when it works though. But I just kill it now. Unfortunately it may not be until Nim 3 based on the Nimony rewrite comes out. It supports incremental compiling and caching which will make the underlying LSP tooling much better. However I find with Cursor that I don’t mind so much the missing autocomplete. I’ve actually thought about writing an alternative LSP just for quick find and error inlining…
- dvfjsdhgfv 1y agoFrankly, I'm surprised this is the only issue you bring up (I had many, when I first tried Nim several years ago - I think they were related to cross-platform GUI libraries for Nim, or the lack of them, or their awful state back then). But LSP as a major concern? For me these little helpers are useful to catch small typos but I could happily do without them.
- stefantalpalaru 1y ago[dead]
- Gud 1y agoWhat I’m curious for is something akin to a language abstraction layer. So you can easily combine codebases written in different languages. I guess something like wasm and llvm.
- zero0529 1y agoWhat a low effort article. I have done some programming in Nim. It’s a nice language but I felt frustrated whenever I wanted to do something I knew I could do in python but that didn’t work in Nim. I just missed some of the syntactic sugar of python, that being said I would love to get back into Nim again.
- Tiberium 1y agoCan you provide some examples if you still remember?
- zero0529 1y agoIf I remember correctly it was when working with collections but I can’t remember a concrete example though. Their std library is by no means bad it is just different enough from python to hurt my productivity. My initial motivation for chosing Nim was because I was doing an algorithm course at the time and I wanted to archive fastest runtimes in shortest amount of code
- polotics 1y agoYou know what, I mostly do python, but then had to get quite high performance on some lib. Converting to Nim and importing with nimpy has been a blast. The result is just one more python module, colleagues don't get frightened when they see the code, it's just seamless and nifty. I much prefer it to Cython.
- ziofill 1y ago> In fact, Nim first compiles to C which in turn is compiled to machine code by the C compiler of your choice (gcc/clang). Can one use the zig compiler after nim has compiled to C?
- blashyrk 1y agoYes, I tried it recently for easy cross-compilation. You can use basically any C/C++ compiler, even TinyCC works (in most scenarios) if you want an extremely fast edit/compile/test cycle.
- Tiberium 1y agoYou can, but zigcc is essentially Clang bundled with extra stuff to make cross compilation easy.
- ethan_smith 1y agoYes, you can use the Zig compiler as a C backend for Nim by setting `--cc:zig` in your Nim compiler flags, which provides better cross-compilation capabilities than traditional C compilers.
- mid-kid 1y agoSo why does nobody ever talk about Haxe in the context of an "everything" language?
- paradox460 1y agoI really wanted to love nim. I wrote a bunch of tools in it, had fun, and then ultimately rewrote them all in rust. The library situation in nim is just unfortunate, and I say that as someone who uses elixir. That, and the cross compiling took far more effort than getting the same code finished on rust, which was little more than "use cross" I keep hoping nim will get better, because it's a beautiful language that produces absolutely tiny, efficient binaries
- summarity 1y agoI’m also an avid Nim developer (findsight.ai is almost pure Nim). I recently compiled some stats on Nims popularity on GitHub: https://code.tc/nim-stats-august-2025/ https://code.tc/nim-stats-august-2025/ It’s growing steadily but I do qualitatively feel like the ecosystem has lost a bit of steam over the past year. Excited for the ongoing Nim tool chain work though.
- binary132 1y agoThe main reason I never got into Nim is that I seem to recall it depending on mingw and that frankly always sets a language into a second-class category for me. Maybe now it’s different, I don’t know.
- nmz 1y agoIt's wild to type this up instead of just checking in your package manager for the dependencies, literally 1 minute to check
- binary132 1y agopackage manager? I’m talking about Windows here. mingw is a GNU toolchain for Windows. It is a big dependency that comes with compromises. I did look to see what nim supports now before I wrote that, and it still suggests mingw.
- fao_ 1y agoAt this point I would feel more enthused to read a "Why not Nim?" page. Advertise where the language is bad at so I can get a better sense of it.
- esafak 1y ago* It hasn't taken off. * It doesn't have many libraries.
- dismalaf 1y agoNim is nice but I can't really find a use for it. Maybe it's because I started out on dynamic languages (Ruby and R) where I got used to writing in a dynamic language and then rewriting bottlenecks in C++. Nim is in the awkward middle area where it's got a GC so it'll never replace C/C++ but it also isn't as productive as something like Ruby.
- miguel_martin 1y agoNim 2 does not have a mandatory gc. It is recommended to use ARC, which has similar semantics to C++, ie moves, copies, etc. Unlike D, the GC is not mandatory for the standard library.
- wolvesechoes 1y agoIt makes me sad that neither Nim nor D didn't take off. Expressive language with native compilation and automatic memory handling is the way to go for me. C# and Java native AOT options are still somewhat limited, and the last thing one can say about Go is that it is expressive.
- brabel 1y agoYou may want to look into OCaml and Dart. Both are highly expressive, have automatic memory handling, native compilation and excellent performance. I like D, but it's a bit of a mess at the moment with the DIP-1000 (Rust-inspired stuff for memory management) half-baked changes, the new experimental allocators (probably coming from Zig), it keeps breaking (on MacOS at least). With the very advanced metaprogramming, it also suffers from lack of good tooling, just like Nim... Nim was going to "solve" that a few years ago, but as far as I can see from the outside, nothing really "shipped" recently to improve the situation. Without good tooling, I am quite sure I am more productive even in Rust (and I am no expert on it), let alone OCaml (tooling is decent, and the language is just really powerful) and Dart (which has absolutely awesome tooling), for example.
- patates 1y agoDoes anyone use Dart in a productive setting outside Flutter? AFAICT (from outside), they even let go of AngularDart and focus solely on Flutter - something which I avoid because of the a11y problems it brings.
- brabel 1y agoYes, it's not very popular but there's lots of good alternatives now for, for example, CLI and Server backends. Some very good frameworks/service to look at for backend development: * Serverpod - https://serverpod.dev/ https://serverpod.dev/ * DartFrog - https://dart-frog.dev/ https://dart-frog.dev/ * DartStream - https://dartstream-prod.frb.io/ https://dartstream-prod.frb.io/ * Appwrite - https://appwrite.io/docs/quick-starts/dart https://appwrite.io/docs/quick-starts/dart It's just a really good language to work on, try the tooling and you'll see it for yourself (either with Flutter or just Dart): https://dart.dev/tools https://dart.dev/tools