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.
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.