God created men; Sam Altman made them equal (taylor.town)
1 points by surprisetalk 1m ago 0 comments
Sling TV's $5 pass buys you one day of cable TV (theverge.com)
3 points by speckx 15m ago 0 comments
Show HN: Zig-DbC – A design by contract library for Zig
1 habedi0 0 8/12/2025, 1:49:57 PM
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 in functions that return errors.
- Transparent error handling that propagates errors from your code to the caller.
Project's GitHub repo: https://github.com/habedi/zig-dbc
No comments yet