View Single Post
Old May 5th, 2006, 9:56 PM   #4
lectricpharaoh
Caffeinated Neural Net
 
lectricpharaoh's Avatar
 
Join Date: Jun 2005
Location: Wet west coast of Canada
Posts: 1,107
Rep Power: 5 lectricpharaoh will become famous soon enough
Quote:
Originally Posted by chepfaust
ok, thanks for the advice.

are there any drawbacks in actually going and making individual modules for every function i wish to possibly use elsewhere?
Yeah, it's more work since each module is generally a separate file in many languages (not sure about VB before .NET).

If you're linking your modules statically, then (in theory) it would be most efficient to have every function in a module of its own, so the linker would link in only those functions referenced in your code (linkers include code on a module-by-module basis). In practice, however, many functions go together. For example, if you use a function to close files, it is implicit that you will also be needing a function to open files, and so these two can go in the same module, not to mention functions to handle the file reading and writing. Thus what niteice reommended: separate the functions into groups based on related functionality, and make a module for each group.
__________________
And once again, Probability proves itself willing to sneak into a back alley and service Drama as would a copper-piece harlot.
- Vaarsuvius, Order of the Stick
lectricpharaoh is offline   Reply With Quote