Re: Circular module dependencies
There is nothing wrong with asking in two places. Please don't criticize people for doing, or at least not in the way that you're doing it. It would be nice if the author added a link to Reddit and vice versa, but otherwise there is no problem in asking in both places.
Re: Circular module dependencies
> will circular module dependencies be something that will be added to Nim? Yes, eventually. I personally would like to have a `submodule` concept for this so that the cycle is restricted to a set of "submodules" but the last time I brought it up it didn't have many sympathizers...
Re: Circular module dependencies
The usual way currently is to use a common "datatypes" file. See also the current discussion to improve the status quo: [https://forum.nim-lang.org/t/4745](https://forum.nim-lang.org/t/4745)
Circular module dependencies
Hey, so I'm writing a simple engine for text adventures, and I'm wondering about circular module dependencies. I have some types (Room, Engine, Object, Exit) which are all in different files and basically need to import each other (because there is no way I can define them all in one file- since for SOMETHING a given object will be undefined. But when I tried to compile my project Nim complained about "..recursive module dependencies." Is there any way to fix this- will circular module dependencies be something that will be added to Nim? Or is there a way that I can work around and achieve this? Thank you for the help!