Zig, Rust, and Other Languages

This page summarizes the projects mentioned and recommended in the original post on news.ycombinator.com

Our great sponsors
  • WorkOS - The modern identity platform for B2B SaaS
  • InfluxDB - Power Real-Time Data Analytics at Scale
  • SaaSHub - Software Alternatives and Reviews
  • zig

    General-purpose programming language and toolchain for maintaining robust, optimal, and reusable software.

  • https://github.com/ziglang/zig/blob/5cd7fef17faa2a40c8da23f0...

    Generally speaking, it’s as mentioned just a convention. A zig library might not allow its users to pass allocators for example.

    In C++, stl containers can take an allocator as a template parameter. Recent C++ versions also provide several polymorphic allocators in the stdlib. You can also override the global allocator or a specific class’ allocator (override placement new).

  • axiom-zig

    A 64-bit kernel implemented in Zig

  • Nim is also a strong player as a systems programming language. In terms of memory management, it's configurable, and by default you get ARC (no GC). I've written a hobby kernel (if you can call it that) in Nim[1] as well as Zig[2], and I found Nim to be much more ergonomic and approachable. The fact that Zig requires weaving an allocator through most calls that may allocate gets in the way of what I'm trying to do. I'd rather focus on core logic and have ref counting take care of dropping memory when appropriate.

    One thing I wish Nim had though is true sum types with payloads. I think there's an RFC for that, but it's a shame it's not in the language yet.

    [1] https://github.com/khaledh/axiom

    [2] https://github.com/khaledh/axiom-zig

  • WorkOS

    The modern identity platform for B2B SaaS. The APIs are flexible and easy-to-use, supporting authentication, user identity, and complex enterprise features like SSO and SCIM provisioning.

    WorkOS logo
  • Odin

    Odin Programming Language

  • There's also Odin[0] too. I tried using them all and Odin was pretty nice. Nim is also good too but a lot more features.

    But - I concluded that language matters a lot less compared to APIs. Yes, the language should have enough good features to let the programmers express themselves, but overall well designed APIs matter a lot more than language. For example -tossing most of the C stdlib and following a consistent coding style (similar to one described here -[1]), with using Arenas for memory allocation, I can be just as productive in C.

    [0] - https://odin-lang.org

  • U8String

    [work-in-progress] Highly functional and performant UTF-8 string primitive for C#

NOTE: The number of mentions on this list indicates mentions on common posts plus user suggested alternatives. Hence, a higher number means a more popular project.

Suggest a related project

Related posts