api stability

Robert Collins robertc at robertcollins.net
Tue Dec 20 02:06:42 GMT 2005


On Wed, 2005-12-14 at 20:08 -0600, John Arbash Meinel wrote:
> Robert Collins wrote:
> > Hi,
> 
> ...
> 
> > What do you think: Is this something the code base might be ready for by
> > the end of february? Is it a good thing (offering a stable api for
> > developers)? Does the above approach approach make technical and social
> > sense?
> >
> > Rob
> >
> 
> I think it would be great to get a stable api soon. I don't know about
> February as a specific deadline.
> 
> I've often wished things were stable a little while longer. But I think
> the biggest thing for us is to get the major features put in. And then
> go around and make almost everything private so that we can change it :)

I think putting stuff in with the minimal public interface is good - we
should not need to run around post hoc.

> I guess the only problem is the difference between "private - this isn't
> stable yet" and "private - you shouldn't use this" or "private - This is
> only for subclasses to use, not public".

__foo -> private to me
_foo -> private to me and subclasses
foo -> public.

Note that _foo is therefor a public symbol if the class is public.

I.e. imagine
module.SomeClass._foo. Thats public in terms of API because I can:
class MySomeClass(module.SomeClass):
  def _foo(self):
    """I now depend on _foo."""

Now imagine
module._PrivateClass._foo. That is not public : we dont guarantee
compatability if you do:
class MyPrivateClass(module._PrivateClass):
  def _foo(self):
    """This is user-beware territory."""


Rob 

-- 
GPG key available at: <http://www.robertcollins.net/keys.txt>.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: This is a digitally signed message part
Url : https://lists.ubuntu.com/archives/bazaar/attachments/20051220/3cde7d9a/attachment.pgp 


More information about the bazaar mailing list