Forward declaration of types in C++ is very limited. You can say `class T;` and 
even forward declare a function that takes a pointer to the type `foo(T*)` but 
not much more. You cannot forward declare class methods, etc. Regarding `*.h` 
and `*.c` files nothing prevent you from having header file `foo_h.nim` in 
addition to `foo.nim`. One can even simulate include guards with `const 
FOO_H=true` in `foo_h.nim` and `when defined(FOO_H):` in `foo.nim`.

Regarding the Nim's file scope, I am not sure I understand. Symbols can be 
exported from modules to the global scope. I know that all these solutions are 
suboptimal, but they worked in C/C++ land for decades.

\--Leo|   
---|---

Reply via email to