Remix.run Logo
kprotty 3 hours ago

I've worked on two "production" zig codebases: tigerbeetle [0] and sig [1].

These larger zig projects will stick to a tagged release (which doesn't change), and upgrade to newly tagged releases, usually a few days or months after they come out. The upgrade itself takes like a week, depending on the amount of changes to be done. These projects also tend to not use other zig dependencies.

[0]: https://github.com/tigerbeetle/tigerbeetle/pulls?q=is%3Apr+a...

[1]: https://github.com/Syndica/sig/pulls?q=is%3Apr+author%3Akpro...

ryanxsim 3 hours ago | parent [-]

I really wanted to deep dive into zig but I'm into rust now kinda late as I'm really just started like 2024.

Have you tried rust? how does it compared to zig?

* just asking

weebull 33 minutes ago | parent | next [-]

Two different philosophical approaches with Zig and Rust.

- Zig: Let's have a simple language with as few footguns as possible and make good code easy to write. However we value explicitness and allow the developer to do anything they need to do. C interoperability is a primary feature that is always available. We have run time checks for as many areas of undetermined behaviour as we can.

- Rust: let's make the compiler the guardian of what is safe to do. Unless the developer hits the escape hatch, we will disallow behaviour to keep the developer safe. To allow the compiler to reason about safety we will have an intricate type system which will contain concepts like lifetimes and data mobility. This will get complex sometimes so we will have a macro system to hide that complexity.

Zig is a lot simpler than Rust, but I think it asks more of it's developer.

lionkor an hour ago | parent | prev [-]

Zig is a modern C,

Rust is a modern C++/OCaml

So if you enjoy C++, Rust is for you. If you enjoy C and wish it was more verbose and more modern, try Zig.

microtonal 4 minutes ago | parent | next [-]

It is kind of interesting that the Linux kernel is slowly adopting Rust, whereas Zig seems like it would be a more natural fit?

I know, timelines not matching up, etc.

bayindirh an hour ago | parent | prev | next [-]

Seriously asking, where Go sits in this categorization?

andrewl-hn 38 minutes ago | parent | next [-]

Go is modern Java, at least based on the main area of usage: server infrastructure and backend services.

bsaul 18 minutes ago | parent [-]

i wonder what makes go more modern than java, in terms of features.

cultab 3 minutes ago | parent [-]

The tooling and dependency management probably

shilgapira an hour ago | parent | prev [-]

It's also a modern C.

If you enjoy C and wish it was less verbose and more modern, try Go.

bayindirh 39 minutes ago | parent [-]

Thanks. I write some Go, and feel the same about it. I really enjoy it actually.

Maybe I'll jump to Zig as a side-gig (ha, it rhymes), but I still can't motivate myself to play with Rust. I'm happy with C++ on that regard.

Maybe gccrs will change that, IDK, yet.

benob an hour ago | parent | prev [-]

Time to start zig++