When is it right for a constructor to throw an exception? (Or in the case of Objective C: when is it right for an init\'er to return nil?)
It seems to me that a cons
It's reasonable for a constructor to throw an exception so long as it cleans itself up properly. If you follow the RAII paradigm (Resource Acquisition Is Initialization) then it is quite common for a constructor to do meaningful work; a well-written constructor will in turn clean up after itself if it can't fully be initialized.