-
As the programming tasks we face become more complicated, leveraging the value of storing repeated code in subroutines becomes more challenging.
-
We've already seen one useful technique: Write simple 'wrapper' functions around 'engine' functions which contain the repeated code and which do the heavy lifting.
-
A wrapper's interface should be designed for user-friendliness. The test of user-friendliness:
-
Does the interface prompt the user to pass the correct number and type of arguments to the engine?
Slide:
19
wrapper_engine
|
© 2003 James E. Keenan |