
Oct. 23, 2003
4:03 a.m.
If I implement it as a collection of methods of an object, I then have to include a separate function which creates an instance of the object and immediately destroys it. This seems clumsy and also doesn't fit with my intuition about what objects are for (representing
"David Eppstein" <eppstein@ics.uci.edu> wrote in message news:eppstein-567571.16030622102003@sea.gmane.org... persistent
structure). Also, again, modularity is violated -- outside code should not be making instances of this object or accessing its methods.
So why not define the class inside the master function to keep it private? For a complex algorithm, re-setup time should be relatively negligible. Terry J. Reedy