News for hackers. Stuff that matters.
Re:Allocgate: Restructuring how allocators work in Zig by steveklabnik on Thursday December 16, 2021 @12:10PM (#29580606)
Not exactly, or at least, not in the same way as Unchecked_Deallocation. There are no memory safety issues with Drop. There are a few times when you need to be a little careful so that you don't get bad behavior: recursive Drop can stack overflow (which is caught and aborts), Drop while Dropping aborts which may not be what you want, if you've written unsafe code, you need to be careful with Drop because what is valid and what isn't may be a bit more tricky since it's effectively a callback.
Re:Allocgate: Restructuring how allocators work in Zig by pjmlp on Thursday December 16, 2021 @01:24PM (#29581774)
I see, then I misunderstood whatever was related to Drop and not being fully stable.

Yeah stack overflow can also be an issue on other RAII approaches.

Re:Allocgate: Restructuring how allocators work in Zig by steveklabnik on Thursday December 16, 2021 @07:18PM (#29585946)
Hm yeah, on the "not fully stable" angle, there's also some talk about "async drop," which doesn't exist just yet, and would be useful in async contexts. Maybe that's what it was.