Reply to Re: Constructor as a "Reset" Button

Your name:

Reply:


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]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация