
15 Aug
2008
15 Aug
'08
8:51 a.m.
On Fri, Aug 15, 2008 at 02:21:33PM +0200, Sean Leather wrote:
In my case, it does matter where instances are in scope. My library requires orphan instances by design. If the programmer imports the top-level module, then s/he gets a default set of instances. But the programmer has the option to import select modules and get a different set of classes and instances.
With implicit import, it just doesn't work to have different instances in different places. Suppose two modules use your library in the different ways you envisage. Then those modules cannot be used together in the same program. Your library will not be re-usable. I'd recommend seeking alternate forms of parameterization.