2 ms·
Yet another comment about rust... :) They mention RAII as an alternative to the `with` statement, and with Rust's borrow checker and strict memory management b
by conradludgate 6y ago
Yet another comment about rust... :)
They mention RAII as an alternative to the `with` statement, and with Rust's borrow checker and strict memory management between async tasks, this isn't such a big problem there. A task must have a guarantee that any data they use will exist during the entire time the task needs it.
Async in rust is already a very contentious topic though, much like this. I do find `go` statements tricky to reason about sometimes, and even the question of where to put them. Should `program.Start()` spawn the goroutine itself, or should you be expected to handle that. I've used both patterns in my work, but communicating that is very tricky