174 karma · joined June 2, 2022
I love that I feel like I'm writing a cross between a dynamic scripting language and a functional language, but that nothing is off limits. I can still dive into memory management if I want to, yet I'm not forced to deal with a cliff of complexity up front. I'd be happy to choose Nim for command line tools, server code, or games and I can't think of another language where this is the case for me.
I've started writing some small internal tools in Nim for work. The language is approachable for other devs who "aren't into languages" to pick up if needed, but I can also share binaries with them so they can just use the tools without needing to set up an env.
* It's garbage collected
* Has algebraic types (enums similar to rust's)
* Pattern matching as good as rust's
* Null check strictness can be configured with the compiler
* Package manager
It's somewhat OOP geared though.
Nim almost feels like I'm writing a dynamic scripting language, except that I've worked with a typed python code base and it sucked because typing always felt taped on. With generics in Nim I feel like I'm duck typing, but my ducks are compile time checked!
I'm keen on experimenting with protocol oriented programming and as far as I understand, UFCS provides this really neatly to the language. I really like the idea of being able to define my own types and have them seamlessly work with functionality of other libs (and vice-versa) without needing to resort to a language feature like traits.
Getting to use Nim for your day job sounds like a dream! I'm particularly keen on Nim's UFCS
I've worked on a python code base that used a lot of deep, multiple inheritance (using mixins) and it was a nightmare to add or change behaviour, so I know the pain.
I think the design patterns book that I've got the most out of is Game Programming Patterns by Robert Nystrom. While putting all your eggs in one ethos is seems to be in vogue, reading this book was refreshingly _balanced_, highly recommend.
I have a machine given (lent) to me by work though.
I've been following the nature of code and making a little 2d platformer at the same time using nim + raylib. Compiling to wasm I found to be even simpler than when doing the same thing with C++. It's really nice being able to compile to native or wasm with a single compiler flag.