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

Also seeing closures as a universal instrument to many cases, often overused.

Problem with them is disrupted control flow and implicit capturing of the context. However, in cases where you have to guarantee something to happen after user code, the RAII guards can't replace the closures, because drop() isn't guaranteed to be called even in safe code...

The ECS GUI integration is an interesting direction. I think Rust ecosystem looked at it, and it was hard.



See also: Document when we do guarantee that drop runs[0]

[0]: https://github.com/rust-lang/nomicon/issues/135


Yeah capturing context is bad.

I think that we need more time to explore this. It took the OOP GUI frameworks a long time to mature.




Consider applying for YC's Fall 2026 batch! Applications are open till July 27.

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

Search: