[gnu.g++] Friend or public member?

saito@sdrvx2.sinet.slb.com (Naoki Saito (GEO-002) Ext. 5471) (09/27/89)

	Hello, folks!  I sometimes wonder whether I should use friend function
or public member to implement some function.  Suppose I defined a vector
class.  If I want to retrieve the size or dimension of the declared vector,
which one should I use?  The following segments explains the situation:

vector a(100);

int naf = dim(a);	// friend function version.
int nap = a.dim();	// public member function version.

This is only the matter of the implementor's taste?  Should I implement both
ways?  If there's any reason to prefer one of them to the other, please let me
know. 

Thanks in advance,

Naoki Saito (saito@sdr.slb.com)
Schlumberger-Doll Research