Verse Modules and Paths
A Verse module is an atomic unit of code that can be redistributed and depended upon, and can evolve over time without breaking dependencies. You can import a module into your Verse file to use code definitions from other Verse files.
A Verse module is specified by the folder in the file hierarchy of the project, and the module's name is the name of the folder. All .verse files in the same folder as the file are part of that Verse module, and can access definitions from the other Verse files in the module without explicitly importing the module.
A module is identified by its path; for example, /Verse.org/Verse. Verse paths provide a global namespace for identifying things, and borrow from the idea of web domains. These paths are persistent and unique, and discoverable by any Verse programmer.
For a list of existing Verse modules, see the Verse API Reference.
Module Members
You can create modules within a .verse file using the following syntax:
| | |
| --- | --- |
| | module1 := module: |
| | ... |
| | |
| | # Similar to classes and function, bracket syntax is also supported |
| | module2 := module |
| | { |
| | ... |
| | } |
You're reading a preview
The full reference is free for BrainDeadGuild Discord members — sign in to read it all, or open the original at the source.
Sign in with your BrainDead.TV / BrainDeadGuild Discord account for full access.