"David Eppstein" <eppstein at ics.uci.edu> wrote in message news:eppstein-567571.16030622102003 at sea.gmane.org... > 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 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
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4