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

That's a terrible API. If you forget to unlock it, have fun pulling your hair out while debugging. Rust makes it so that you can't forget.


lol

POSIX threads are far more battle-proven than any threading API in Rust. All of the underlying multi-threading on the system you made your comment from is using pthreads. It works fine in reality, despite all the pearl clutching.

>Rust makes it so that you can't forget.

And the tradeoff is an unreadable, puke-inducing one-liner. You can do a (readable) scoped lock with a macro in C (GCC defines the __attribute__ cleanup) or RAII-style with destructors in C++.


"Works fine" is an interesting choice of words for the absolute tire fire of a tech stack that modern tech currently depends on.

You should probably see a doctor about your hyperemesis.




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: