Boost logo

Boost :

From: Jeremy Siek (jsiek_at_[hidden])
Date: 2001-06-27 12:50:22


On Wed, 27 Jun 2001 williamkempf_at_[hidden] wrote:
> implementations. In order to have a "procedural interface" we have
> to either make the thread_desc a structure with all public data or
> make every method a friend. Both of these are generally considered
> poor design choices for OO systems.

Really? The graph library uses only friend functions, and I didn't hear
anyone complain about that. In fact, free (friend) functions have several
advantages. Friends retain all the encapsulation, and allow for adapting
third-party classes to the interface without changing the third-party
code. You may argue that friends are broken on many compilers... true, but
that's what #ifdef's are for... it should not change our design. Using
friends may be looked down upon by traditional OO, but haven't we moved
beyond OO?

Cheers,
Jeremy

----------------------------------------------------------------------
 Jeremy Siek www: http://www.lsc.nd.edu/~jsiek/
 Ph.D. Candidate, IU B'ton email: jsiek_at_[hidden]
 Summer Manager, AT&T Research phone: (973) 360-8185
----------------------------------------------------------------------


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk