api stability

Robert Collins robertc at robertcollins.net
Tue Dec 20 06:58:07 GMT 2005


On Tue, 2005-12-20 at 00:10 -0500, Aaron Bentley wrote:
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
> 
> Robert Collins wrote:
> | __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 don't understand this logic.  If _foo is private to me and subclasses,
> why would it also be public?
> 
> Wherever I've used _foo, I've intended to warn users that foo was not
> guaranteed to be supported, but use it if you must.

As John says, its to balance 'dont use _foo from outside this class'
with 'but you can use it/override it inside the class or subclasses'.

Maybe a better set of terms would be
'unsupported symbol'
'supported symbol'
'deprecated symbol'

?

(This avoids the confusion between public/private in terms of where a
symbol may be used, and the concepts that we're trying to highlight here
about what people can depend upon vs not depend upon)

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/9e4c995f/attachment.pgp 


More information about the bazaar mailing list