3 ms·
> Performance and Safety: Choose Two How does Zig manages its memory ? I couldn't find any info on a garbage collector, so I assume the memory isn't dynamicall
by littlestymaar 8y ago
> Performance and Safety: Choose Two
How does Zig manages its memory ? I couldn't find any info on a garbage collector, so I assume the memory isn't dynamically-managed.
If it's statically managed, how is it done ? I it using some kind of region-based checking, like Rust with its borrow-checker ? Or is it 100% in the hands of the programmer ? (In which case, the «safety» argument is a bit strange).
- dinglejungle 8y agoIt's 100% manual[1]; that "safety" you're quoting is not referring to memory safety. [1] https://ziglang.org/#Manual-memory-management https://ziglang.org/#Manual-memory-management
- AndyKelley 8y agomemory safety is in fact planned, check out the GitHub issue links at the end of the safety section for more information. I'm excited about those plans - in my opinion it will make zig a real competitor to Rust in particular. Until then rust has the upper hand for the memory safety use case.
- majkinetor 8y agohttps://ziglang.org/#Manual-memory-management https://ziglang.org/#Manual-memory-management