[rfc] MethodObject or CommandObject pattern and reconfigure.py

Martin Pool mbp at canonical.com
Wed Aug 5 01:40:14 BST 2009


2009/8/5 Robert Collins <robertc at robertcollins.net>:
> Sure. I'm simply saying its not as cut and dried to me as 'narrow
> interface -> use a function'.

If the public interface is "do something and give me back the results"
then yes, I think you generally should just use a function as the
simplest expression of that.  At least we should do it more often than
I personally have done it in the past.  You should stop and think
whether there's a sensible coherent object model you could use, but if
there is not one, don't add an object just for the sake of it.  Of
course you need to decide case by case.

-- 
Martin <http://launchpad.net/~mbp/>



More information about the bazaar mailing list