Recent submissions

Comment · 7 months ago
Comment · 8 months ago
Batching/arenas can get you very far. If you adopt the zig/c object model as “things that have data” most destructors become useless. Resource management also can be accomplished at the batch level (eg you can free a bunch of fd’s all at once with a management layer rather than having each File object implicitly manage its own fd). For memory management, i believe proper use of arenas and batching tends to be faster than each object managing its own memory but idrk tbh. What the author is saying is that you dont have to have raii, you can use approaches like the one i described and they can still be pretty safe if you know what youre doing, but rust’s model basically prevents this if youre using rust idiomatically
Comment · 1 year ago
zig is trying its best to also be memory safe (at runtime, if you want it) whereas c is stuck in the past (you can add on sanitizers, but they arent built into the language)
Comment · 1 year ago
Comment · 1 year ago
It seems like he wants zig to be more like rust. personally, i like that zig is so simple
Comment · 2 years ago

Live from the official Hacker News API

A modern reader for Hacker News · SvelteKit + Skeleton