4 ms·
This is a very interesting language, but the documentation on its main page is sparse. The highlighted features leave a lot open. I wonder how exactly it compar
by jonathanstrange 10y ago
This is a very interesting language, but the documentation on its main page is sparse. The highlighted features leave a lot open. I wonder how exactly it compares to C, and what's it's relation in terms of safety to Ada and Rust. More importantly, what kind of memory management does it use? Does it have a GC?
If it has a GC, I'd find it even more interesting...
- naasking 10y agoI wondered about memory management too considering this language is supposed to "prioritize safety". Memory is manually managed though, which you can see from their HashMap example on the website. The description indeed leaves a lot open to interpretation. They should have a brief overview that uses some standard terminology to describe Zig.
- Sean1708 10y agoThat's when using a custom allocator though, browsing through the other examples it doesn't look like there's any manual memory management going on but that could just be the examples chosen.
- naasking 10y agoBut it does an explicit free operation, and no mention of preventing double-frees, which to me implies it's unsafe.