logoalt Hacker News

dnauticsyesterday at 7:57 AM1 replyview on HN

I don't know if this particular error would have been findable with zig-clr, but you don't need RAII. Errdefer/defer is enough, if you have an alogrithm checking your work.


Replies

hardwaresoftonyesterday at 1:30 PM

It’s not that you NEED RAII (or any other language abstraction), it’s that this case would have been avoided with that usage.

Clearly, the current state of things was not enough.