On Wed, May 24, 2006 at 01:04:20PM +0000, Angus Leeming wrote:
> Jean-Marc Lasgouttes <[EMAIL PROTECTED]> writes:
> > Michael> isDeletedText has been changed into a method of class
> > Michael> Paragraph (where it belongs). This is also more OO-like.
> 
> > I think Lars prefers to have these kind of helper functions outside of
> > classes. We tend to have too many methods now, so moving functions to
> > methods is backwards, I think.
> 
> Right. Scott Meyers, Effective C++, item 18: Strive for class
> interfaces that are complete and minimal.
> 
> bool isDeletedText(Paragraph const &);
> 
> does not require access to anything that isn't public,
> so keep it out of the class.
> 
> Having said that, he also argues (some other item) that
> non-member functions that are declared in the same header
> as the class itself should be considered as part of the
> class interface... ;-)

And, unfortunately, IDEs are usually better at handling class methos
instead of free functions...

[That's no judgment, just a remark]

Andre'

Reply via email to