| ▲ | ryanxsim 3 hours ago | ||||||||||||||||||||||||||||||||||||||||||||||
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 29 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. | |||||||||||||||||||||||||||||||||||||||||||||||
| |||||||||||||||||||||||||||||||||||||||||||||||