3 ms·
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
by kvark 6y ago
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.
- adamnemecek 6y agoYeah 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.
- ChrisSD 6y agoSee also: Document when we do guarantee that drop runs[0] [0]: https://github.com/rust-lang/nomicon/issues/135 https://github.com/rust-lang/nomicon/issues/135