> I suppose that if I import bar.nim in multiple files, I would get types > redefinitions.
I don't think so, but please let me know. And thanks for your example, I have to mention that for objects it can be necessary to export fields too. With imports the really fun part is cyclic imports. We have forum posts about that, I have to add that also to the book. When you really love to write ptr cuint) and cast[ptr cuint](addr result.build), I am not sure if Nim is such a good choice :-)