Skill Issue logo

Skill Issue

Subscribe
Archives
January 31, 2025

Un-Nim-portant

I'm learning Nim, so let's talk about what it is. It's a little hard to pin down. You say that it's a statically-typed, general-purpose, multi-paradigm, high-level programming language, but you could say the exact same thing about C++. Nim ain't C++.

Firstly, Nim has garbage collection. You can turn it off, but by default you're not messing around with malloc and free. That's what initially attracted me to the language. I've been living in Ruby-land for too long to want to do manual memory management unless I absolutely have to.

Nim has a indentation-based syntax, like Python. I don't love that, but I don't hate it either. It also has a robust, LISP-like macro system, which does appeal to me way more than C++'s macros.

Nim also has an option type, too. I like having an option type. I'd rather just have a Hindley-Milner type sytem, but as long as I don't have to deal with null pointer shit, I'm happy. I don't know how the language handles all that yet, but I'm optimistic to find out.

Finally, the language compiles to C, then uses your platform's C-compiler to turn that C into native code. That's a somewhat (but not totally) unusual choice, but I like it. It simplifies interop and leverages all the fun optimizations available from mature C toolchains.

It seems like a good language to build a game in, at least for someone who isn't interested in writing C/C++ and hasn't caught the Rust bug yet. People definitely use the language for that, and they use SDL as their worked example for calling out to C libraries. Again, I'm optimistic, but only time will tell.

Next week, I'll start diving into some of the specifics of Nim. Hopefully there's something interesting to talk about in the language!


Sumac announced a new album with Philly-based poet/noise artist Moor Mother. I'm very excited for it, and not just because I'm doing some work with Sumac's record label, Thrill Jockey. Check out the new single.

Don't miss what's next. Subscribe to Skill Issue:
GitHub Bluesky X LinkedIn
Powered by Buttondown, the easiest way to start and grow your newsletter.