3 ms·
Yes you can easily make a one liner allocation function in zig that takes an allocator as input with a comptime type and panics if allocation fails and returns
by helen___keller 3y ago
Yes you can easily make a one liner allocation function in zig that takes an allocator as input with a comptime type and panics if allocation fails and returns the unwrapped allocation
I just say nuisance because zig code often looks like Go code in that almost every return type becomes an error union as allocation error handling (and maybe other errors) trickle up
- TylerE 3y agoFrom my experience with Zig (limited but not zero) it seems like an ok solution to a problem I don't have, and don't forsee having.