Is Two-Step Initialization a Solution or a Symptom?

At times, it might appear practical to execute additional initialization steps for an object after its constructor has completed. However, I���m of the belief that such requirements signal underlying design flaws, such as object mutability,base class fragility, violation of layering, and unfocused abstraction. A constructor should be good enough for all scenarios. If it���s not, refactor the object.

[image error]�������������� (2008) by Igor Voloshin

This is how it usually happens (I found it in Apac...

 •  0 comments  •  flag
Share on Twitter
Published on August 07, 2023 17:00
No comments have been added yet.