I am currently having a problem finding a good way to manage some module dependencies.<br><br>I have a single module which called 'formula'.  It looks very similar to the core dict module which allows users to create, query and modify their dict datastructures.  My formula module allows users to create, query and modify boolean formula.<br>
<br>However, I am currently experimenting with different internal data structures for the formula module and would like to be able to swap them in and out of my program easily.  Currently there are a number of different modules which make function calls to the formula module and it seems that I would have to go and edit each function prefix for every call.<br>
<br>My current options seem to be to me<br><br>1: Add a macro which will change the prefix for me at compile time.<br>2: Write each prefix as a Variable (Prefix:fun()) and pass in the appropriate module with each function call.  I believe those calls are significantly slower than non-variable prefixed function calls.<br>
<br>3: reorganise my code in a more sensible way.<br><br>Currently I am still thinking about the code organisation in a very OO way and if there is a good Erlang approach to this kind of problem I would love to learn about it.<br>
<br>Thanks in advance.<br>