This is not a good fit for RAII, as it turns out, and just makes life unnecessarily painful.
A plain-old explicit, "C-like" init sequence would make so many things so much less convoluted! E.g.:
484 (app init crossdeps.)
472 (View.reset)
462 (Ensure initial onResize)
BUT, BEWARE: Lots of static instances (initialized from the config etc.) at various places may potentially interfere with that, as they assume everything being already constructed properly, "by magic" (which is the very point of RAII)!
This is not a good fit for RAII, as it turns out, and just makes life unnecessarily painful. A plain-old explicit, "C-like" init sequence would make so many things so much less convoluted! E.g.:
484 (app init crossdeps.)
472 (View.reset)
462 (Ensure initial onResize)
BUT, BEWARE: Lots of
static
instances (initialized from the config etc.) at various places may potentially interfere with that, as they assume everything being already constructed properly, "by magic" (which is the very point of RAII)!