Posted by Toby A Inkster on 07/25/07 09:35
Sanders Kaufman wrote:
> The best answer came from Jerry when he said it was for purely academic
> reasons - to keep tight with the OOP design principles.
How about this... what happens when one day you decide that your
constructor should do something over and above what the reset function
does?
For example, your reset function might want to just reset the object to
its initial state, but the constructor might also want to log some
debugging messages to a file.
--
Toby A Inkster BSc (Hons) ARCS
[Geek of HTML/SQL/Perl/PHP/Python/Apache/Linux]
[OS: Linux 2.6.12-12mdksmp, up 34 days, 13:13.]
Cryptography Challenge
http://tobyinkster.co.uk/blog/2007/07/24/crypto-challenge/
[Back to original message]
|