note 50626 deleted from language.oop5.decon by levim

From: Date: Tue, 18 Mar 2014 02:06:41 +0000
Subject: note 50626 deleted from language.oop5.decon by levim
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-198913@lists.php.net to get a copy of this message
Note Submitter: ---- > To caliban at darklock dot com: Why not just define > a dummy constructor Because you don't always get to modify your base classes. Once you get beyond the "build to suit" range of software development, you end up having to work with other people's code, and sometimes you just plain can't change it. When Bob is in charge of making changes to that object, you can't add a dummy constructor. You have to tell Bob to do it, and until Bob does it, you don't get it. So if you want to hit your deadlines, you don't count on Bob caring enough about your job to make the changes you want... you work around it. It might be convenient for *you* to have a constructor on that object, but when you're only one of several thousand people that are using it, your convenience isn't generally among the design criteria. Smaller projects where you can add whatever you want wherever you want will not have this problem, in which case the dummy constructor is indeed a better solution.

« previous php.notes (#198913) next »