This is pretty cool, I like to see this kind of project coming to Zig. Zig's compile-time language features make DbC a natural fit.
I am not yet proficient enough in Zig to be able to evaluate how well the syntax fits into idiomatic Zig.
Good work.
habedi0 165 days ago [-]
Thanks.
I'm new to Zig myself and created this library because I had trouble verifying the correctness of the code I wrote for a set of complex data structures in another larger Zig project (this one: https://github.com/habedi/ordered). I'm currently experimenting with how to use DbC in Zig, which led to the creation of this library.
skavi 165 days ago [-]
Why are the checks included in ReleaseSmall?
habedi0 165 days ago [-]
I created this library to help me verify the correctness of my Zig code in another project. However, I wanted the option to strip the checks when the code becomes more mature, for efficiency. For efficiency, I mainly care about speed, which is why checks are only compiled out in `ReleaseFast`.
166 days ago [-]
Defletter 165 days ago [-]
Another project burdened by Andrew Kelley's weird hate-boner for function literals.
(struct { fn run }).run
How ridiculous that this is required to do something so simple.
That's kinda weird and sad. Lambdas are very useful TBH.
Defletter 164 days ago [-]
Wouldn't surprise me whatsoever if someone creates zigplus, which is just some TypeScript-style superset that adds lambdas and interfaces to Zig as syntax sugar.
skyzouwdev 165 days ago [-]
[dead]
Rendered at 06:43:13 GMT+0000 (Coordinated Universal Time) with Vercel.
I am not yet proficient enough in Zig to be able to evaluate how well the syntax fits into idiomatic Zig.
Good work.
I'm new to Zig myself and created this library because I had trouble verifying the correctness of the code I wrote for a set of complex data structures in another larger Zig project (this one: https://github.com/habedi/ordered). I'm currently experimenting with how to use DbC in Zig, which led to the creation of this library.