4 Sep 2009 07:57
[PEPr] Comment on Images::Image_Diff
Daniel O'Connor <daniel.oconnor <at> gmail.com>
2009-09-04 05:57:56 GMT
2009-09-04 05:57:56 GMT
Is there any compelling reason to make these static methods? Being static means I can't mock them out, and makes them more like namespaced functions than an Image_Diffing object. Ie: Image_Diff::nearlySame() could easily be $diff = new Image_Diff(); $diff->nearlySame(); while having none of the drawbacks of statics (http://misko.hevery.com/code-reviewers-guide/flaw-brittle-global-state-singletons/) -- http://pear.php.net/pepr/pepr-proposal-show.php?id=611 -- -- PEAR Development Mailing List (http://pear.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RSS Feed