Hi all, I have a recursive module dependency. How to solve this ? Say, i have two modules like this.
#module_A.nim
type
a_Type* = ref object
aVar* : b_Type
And in another file,
#module_B.nim
type
b_Type* = ref object
bVar* : a_Type
How can i avoide recursive module dependency ? @Stefan_Salewski, Thanks.
@juancarlospaco Let me try.
I would strongly recommend avoiding include as much as possible, and in particular in this case.
What works usually is to create a module for your types, or to think about how you structure your program, usually you will see that you aren't organising your code in the best way.
I second dom96, recursive module dependency is a sign of bad code organization.
Avoid it.