| ▲ | vlovich123 2 hours ago |
| Zig makes you choose either safe or fast, not both. With Rust you can get both (generally). |
|
| ▲ | senderista 42 minutes ago | parent | next [-] |
| Part of the safety you get with Rust is runtime bounds checking, which is equivalent to Zig in "safe" mode. |
| |
| ▲ | vlovich123 20 minutes ago | parent | next [-] | | Bounds checking is like 1% of the safety that Rust guarantees you. That's a false-equivalence. The bigger ones are around memory safety like use-after-free, double-free, and memory issues in the face of concurrency. Zig does not help you with that. | |
| ▲ | afdbcreid 25 minutes ago | parent | prev [-] | | Bound checks, which are part of what you get with Rust, also exist in ReleaseSafe Zig, that is true. But if that is what you wanted to say, your statement is very confusing and also does not answer the GP. If you meant to say ReleaseSafe and Rust are equivalent, then this is just false. ReleaseSafe still has many UBs (most importantly use after free and double free), not to mention that Rust solves many problems at compile time and Zig only at runtime. |
|
|
| ▲ | Zambyte 2 hours ago | parent | prev [-] |
| Zig makes you choose that at build time. You can use safe builds for development to catch bugs, and fast builds for release. You can even use safe builds in of the release, and optimize hot paths with fast builds. In practice, projects written in Zig very much can choose both. |
| |
| ▲ | bhaak an hour ago | parent | next [-] | | You make it sound as if all bugs could be catched in development builds. | |
| ▲ | pjmlp an hour ago | parent | prev [-] | | Still doesn't have a good answer for use after free, although the allocators on the last release might help into that regard. |
|