3 ms·
You can for all intents and purposes avoid two phase init with factory functions (which is how Go does it) and private constructors. (To my memory though, Goog
by shadowgovt 3y ago
You can for all intents and purposes avoid two phase init with factory functions (which is how Go does it) and private constructors.
(To my memory though, Google didn't throw away the benefits of RAII without allowing exceptions... They discouraged complicated behavior in constructors and so the only thing a constructor could fail on was OME, which was supposed to crash anyway).