After more than a year working day in and day out on a large Python codebase, I started looking for a statically-typed language where I could be as productive as I am in Python. While Python’s type hinting helps, I’ve found that features not directly enforced by the language can become problematic in real-world, large-scale projects. For bigger endeavors, I’ve generally settled on Go (Dead Simple Blog Generator, CodeWeaver) or Rust (CloudMapper, BibRust), depending on the specific requirements. Although I appreciate C++, its tooling felt too different from my daily workflow, so it was off the table from the start. For traditional scientific programming, however, both Go and Rust can feel a bit heavyweight. This led me to explore “modern C” alternatives, and Zig, a language I kept reading about, particularly caught my attention.
My initial foray into Zig involved implementing a series of finite difference schemas I was deriving. On the bright side, once I got the hang of it, the language largely got out of my way. It felt modern, close to the metal, and remarkably fast. As the work progressed, however, I began to miss more mature tooling and a richer ecosystem. At one point, I needed to generate videos based on these schemas; for that, I had to resort to saving large CSV files and then using Python for the video generation, which was a bit clunky and awfully slow. The error messages also left something to be desired.
The last straw was the lack of built-in parallelism. I discovered that, as of version 0.14.0 (see discussions like this one), concurrency features had been removed from the language, with plans to reintroduce them later. The language is clearly still in flux, with a development philosophy that seems to prioritize breaking changes now to achieve long-term correctness.
While this approach is laudable, I found Zig too immature for my current needs. I ended up porting the entire project to Rust, where I could directly generate videos, leverage parallel processing, and benefit from more mature tooling. This isn’t to say Zig can’t be used in production—projects like Bun demonstrate its capabilities—but for my specific project, Rust was a better fit at this time. All in all, I’ll keep an eye on its development and will likely try Zig again in the future.
#ZigLang, #RustLang, #Python, #ProgrammingLanguages