API issues

Aaron Bentley aaron.bentley at utoronto.ca
Thu Sep 15 14:57:54 BST 2005


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Scott James Remnant wrote:
> A few bzrlib API issues that have made implementing something based on
> top of it a little tricky.
> 
> 
> smart_add_branch() is great, we can pass in a branch object and a
> reporter callback function and get the feedback we need.  Though it
> feels wrong calling a separate function -- could this not be bzrlib.add
> itself?

I think Branch is the wrong layer for DWIM.  If you want to do this, I'd
much rather see it in a SmartBranch class that delegated to a branch
member.  That way, the branch API is simpler and easier to reimplement.

Frankly, I think your feeling about functions is wrong.  They're a
well-proven tool.  Just because objects are good doesn't mean functions
are bad.

Aaron
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.1 (GNU/Linux)
Comment: Using GnuPG with Thunderbird - http://enigmail.mozdev.org

iD8DBQFDKX3i0F+nu1YWqI0RApD4AJ0Skp+AFiWTH/vElr9UVKqlHqjuegCfa9Lo
z9tJd3NlUwHCoF3O9JLHXQ0=
=zujB
-----END PGP SIGNATURE-----




More information about the bazaar mailing list