Le jeudi 02 ao?t 2007 ? 20:28 +0900, "J?rgen P. Tjern?" a ?crit :
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
> 
> Daniel Berger wrote:
> > [ .. snip .. ]
> > The advantage of allowing send to access private methods is that it
> > allows you to test private methods. :)
> Isn't that a Bad Practice (tm)? Private methods are mostly meant for the
> internals of a class, and a test should really only test how the class
> interacts with the rest of the world - right? (i.e. public methods)
> 
> I might've missed the whole point, so this post contains Many
> Questionmarks. ;-)
> 
> Kindest regards, J?rgen P. Tjern?.
> -----BEGIN PGP SIGNATURE-----
> Version: GnuPG v1.4.6 (GNU/Linux)
> Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org
> 
> iD8DBQFGsbDiUMzc1WGo4zgRAoJ3AJ9MtInhJTZS9Uq1ABXwxxN9rwkeVACffYBG
> +iCp8nwruwSH/WzNSAsbQp8=
> =ndYq
> -----END PGP SIGNATURE-----
> 

It is a root of bad practices, but it may be necessary... I think a good
principe is : use public methods only of others's libraries, and use
instance_eval (etc) of yours when you need it, and if there is
collaboration between classes (like friendly classes of C++). 
Thus you will be able to keep your model safe.

--
Etienne Vallette d'Osia