17 Sep
2006
17 Sep
'06
8:55 p.m.
Geoff Worboys wrote:
That is my current take on it. Single phase construction is obviously best where feasible - it keeps everything simpler and clearer. But at this time I can see no alternative but two phase construction (objects with active/inactive state) for some situations.
Are there practical alternatives? If so I'd love to hear about them.
As I explained in another post in this thread, I think boost::optional is the ultimate solution to the active/inactive state problem, so the class itself can still have single phase construction. Yuval