Allow DeclareModule for forward declarations

Got an idea for enhancing PureBasic? New command(s) you'd like to see?
Mistrel
Addict
Addict
Posts: 3415
Joined: Sat Jun 30, 2007 8:04 pm

Allow DeclareModule for forward declarations

Post by Mistrel »

PureBasic is a single-pass compiler and therefore requires the use of forward declarations where necessary. The problem with this is that modules cannot be forward-declared.

Yes, we can just redefine stuff explicitly in another module but this completely circumvents the self-documenting use case of modules as namespaces.