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

On Oct 5, 2005, at 6:31 PM, NAKAMURA, Hiroshi wrote:
> Jamis Buck wrote:
>> Well, to be fair, it was a private API that changed. The problem was
>
> What is the concept 'private API' here?  In general library  
> development, there are 2 APIs for users and developers.  For users  
> it can be called 'public API' as you wrote.  Is 'private API' you  
> wrote an API for developers who extend a class for implementation  
> inheritance?

I think by 'private API' Jamis means Logger implementation that is  
not meant to be exposed to either users or developers.  So it's not  
really a part of the API at all.


> Anyway, at this time, developers should not do both removing  
> constants for redefinition and overwriting private methods without  
> explicit permission by documents if they can.

Agreed.  However, in 1.8.2 logger.rb:

# There is currently no supported way to change the overall format,  
but you may
# have some luck hacking the Format constant.

Hence we have these hacks to expose internal Logger implementation to  
add this missing feature.  But these hacks had to modify Logger  
implementation that was not a part of its API, public or private.

It's cool to think of the ability to redefine a private method as  
part of a library's public API.  In fact, I think that Logger  
documenting that it expects the format_message method to be redefined  
may be a nicer API than setting a formatter object.

Best,
jeremy
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.2 (Darwin)

iD8DBQFDRIj5AQHALep9HFYRAgQIAJ9jHrYJeqzpSLzPLAxVfPs6Uc4KXQCgkBLE
FhSPdZnGkOVj2MuhE0Uj8Rk=
=Y0h/
-----END PGP SIGNATURE-----