Better HN
top
new
best
ask
show
jobs
Log in
Sign up
Better HN
Comment
by
wmedrano
· 5mo ago · 0 comments
If you don't pass an allocator param in Zig, then the function basically can't allocate.
Comments
[–]
3836293648
5mo ago
No, that's just a convention. Any function can just create a new allocator, or import the global one, or use malloc from libc. Zig does nothing to enforce this convention.
[–]
scritty-dev
5mo ago
isn't that more of a convention than an actual guarantee?