Oberon icon indicating copy to clipboard operation
Oberon copied to clipboard

Can a DEFINITION module be written in Oberon+

Open wrightsl opened this issue 1 year ago • 1 comments

I have a problem in pure Oberon with circular references between the implementation of two modules. This is solved in Modula2 using a DEFINITION and an IMPLEMENTATION module (both written in Modula2). Does the DEFINITION in Oberon+ work in the same way (with the DEFINITION written in Oberon or Oberon+) or is it only used for foreign language implementation? If the DEFINITION can be written in Oberon how do you include the DEFINITION and the relevant module implementing the DEFINITION in a project?

wrightsl avatar Jan 08 '25 09:01 wrightsl

Neither Oberon nor Oberon+ support mutual module dependencies. DEFINITION modules are not part of original Oberon, just an informal means to present the public parts of a module. In Oberon+, DEFINITION modules are part of the language (where the DEFINITION module is a kind of text based symbol file), but the Oberon module semantics still apply.

Usually it is possible to add a third module with common declarations to avoid mutual module dependencies.

rochus-keller avatar Jan 08 '25 11:01 rochus-keller