Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Given that Zig has functions which can return functions, maybe you could capture the top level io and allocator and return a struct with a bunch of functions that now have the top scope io and allocator visible.

Don’t know. That’s how people usually get rid of repeat arguments (or OOP constructor).



Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: