Hacker News new | ask | show | jobs
by KingOfCoders 372 days ago
I do love the allocator model of Zig, I would wish I could use something like an request allocator in Go instead of GC.
1 comments

Custom allocators and arenas are possible in go and even do exist, but they ara just very unergonomic and hard to use properly. The language itself lacks any way to express and enforce ownership rules, you just end up writing C with a slightly different syntax and hoping for the best. Even C++ is much safer than go without GC
They are not integrated in all libraries, so for me they don't exist.