Show HN: Zig-DbC – A design by contract library for Zig
Hi everyone,I've made an open-source library for using design by contract (DbC) principles in the Zig programming language.It's called Zig-DbC, and it currently provides the following features:- A simple API to define preconditions, postconditions, and invariants.- Contracts are active in `Debug`, `ReleaseSafe`, and `ReleaseSmall` modes to catch bugs early.- All checks are removed at compile time in `ReleaseFast` mode for zero performance cost.- An optional mode to handle partial state changes i...
Read more at news.ycombinator.com