Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Yeah, it’d be interesting to see the Rust code contrasted with correct C versions. How does the C code deal with a monitor being unplugged? I wonder if it could be shuffled around to amount to an early return with an Unplugged error.


In C, you're supposed to listen for a "destroy" event on the output and then in the handler you would delete all your references to the object. I would be interested to know if any language has a way to statically analyze this, instead of using a monad.


If I understood it correctly, monitor doesn't really go away in your event handler, so C code don't have to deal with that.




Consider applying for YC's Winter 2026 batch! Applications are open till Nov 10

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: