top | item 44551248

(no title)

jdcasale | 7 months ago

I am also struggling to see the difference between this and language-level support for an arena allocator with RAII.

discuss

order

lerno|7 months ago

You can certainly do it with RAII. However, what if a language lacks RAII because it prioritizes explicit code execution? Or simply want to retain simple C semantics?

Because that is the context. It is the constraint that C3, C, Odin, Zig etc maintains, where RAII is out of the question.

imtringued|7 months ago

If you want RAII to be explicit, then show an error if you fail to call the destructor. That's it.