|
|
|
|
|
by jonathrg
620 days ago
|
|
Although it doesn't have the same level of compile-time guarantees, there are runtime checks to ensure memory safety if you use Debug or ReleaseSafe. You can do your development and testing in the default Debug mode and only use ReleaseFast or ReleaseSmall once you need the extra optimization and are confident in your test coverage. |
|
it is not very good, as
outputs 123 in debug[0] and 0 in ReleaseSafe[1] instead of giving a Runtime Error.[0] https://zig.godbolt.org/z/ezTr3zP6a
[1] https://zig.godbolt.org/z/3ExeveT69