Jos van Uden:

// this shouldn't happen

test.d

import simdb;

If I try to compile something like that my dmd gives me a duplicated main error, or something similar.


I really mean:

test.d
 void fun() {
     auto db = load();
     // etc
     store(db);
}

simdb.d

import test;

fun();

Do you mean that the load and store functions are "private" and should only be called by other functions in the module? (If this is true, then it's enough to mark as module-private those two functions).

Bye,
bearophile

Reply via email to