Collections of functions are not objects

A manifestation of modulitis is collecting associated functions into an object. Functions must live with the objects that they affect, not in handy packages. Functions that apply to more than one object usually should be static members. Only when you apply overloading (as in the case of operators, or with some templates) is it appropriate to use true global functions--that is, those outside the scope of any class.


[Contents] [Previous] [Next]
Click the icon to mail questions or corrections about this material to Taligent personnel.
Copyright©1995 Taligent,Inc. All rights reserved.

Generated with WebMaker