To sum up: the two-phase construction approach leads to more complicated invariants and typically to less elegant, more error-prone, and harder-to-maintain code. Consequently, the languagesupported ‘‘constructor approach’’ should be preferred to the ‘‘init()-function approach’’ whenever feasible. That is, resources should be acquired in constructors whenever delayed resource acquisition isn’t mandated by the inherent semantics of a class.