dedicated setters (e.g. $obj->foo($bar) vs $obj->set_foo($bar))

Eric Wilhelm scratchcomputing at gmail.com
Sat Sep 29 18:37:36 BST 2007


Why are the getters also the setters?  This is slower, particularly when 
they are used primarily as getters.  It's also much easier to search 
for set_foo in the code.

I really think that API should be broken sooner rather than later, but 
it's a big change and I'm not sure why they were originally laid-out 
this way.

--Eric
-- 
"Everything should be made as simple as possible, but no simpler."
--Albert Einstein
---------------------------------------------------
    http://scratchcomputing.com
---------------------------------------------------


More information about the tapx-dev mailing list