Skip to content

Commit 99f8e40

Browse files
committed
Update wording
1 parent e071f4c commit 99f8e40

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

docs/user-guide/04-modules-and-access-control.md

+6-6
Original file line numberDiff line numberDiff line change
@@ -191,14 +191,14 @@ The Slang compiler enforces the following rules regarding access control:
191191
- Type definitions themselves cannot be `private`, for example, `private struct S {}` is not valid code.
192192
- `interface` requirements cannot be `private`.
193193

194-
## Organizing Systems of Modules
194+
## Organizing File Structure of Modules
195195

196196
Slang does not seek to impose any specific organization of modules. However, there are some conventions that have emerged as being useful.
197197

198198
### Module Organization Suggestions
199199

200-
- Top-level modules are those that are `import`ed by user code.
201-
- The implementation details of the module are placed in the lower levels of the tree.
200+
- The top-level directory contains modules that would be `import`ed by user code.
201+
- The implementation details of the modules are placed in files at lower levels of the tree.
202202

203203
This has the benefit that it is easy for a user to distinguish the public API from the implementation details.
204204

@@ -210,9 +210,9 @@ This has the benefit that it is easy for a user to distinguish the public API fr
210210

211211
The above diagram shows a module organization example.
212212

213-
Top-level modules such as `utils.slang` are those that are directly `import`ed by user code. The implementation details of the module are placed in the lower levels of the tree.
213+
Top-level module files such as `utils.slang` are those that are directly `import`ed by user code. The implementation details of the module are placed in the lower levels of the tree, organized into similarly named subdirectories for clarity.
214214

215-
In this example, the `utils.slang` module needn't contain anything more than a module declaration and a list of included sub-modules, with optional `import` statement(s) to pull in any external dependencies, e.g.
215+
Modules like `utils.slang` needn't contain anything more than a module declaration and a list of included files, with optional `import` statement(s) to pull in any external dependencies, e.g.
216216

217217
```
218218
module utils;
@@ -223,7 +223,7 @@ __include "utils/tonemap.slang";
223223
__include "utils/fill.slang";
224224
```
225225

226-
Here, all the symbols defined in `accumlator.slang`, `tonemap.slang`, and `fill.slang` are visible to the user of the `utils` module, and these helper modules do not need to clutter the top-level file hierarchy.
226+
Here, all the public symbols defined in `accumlator.slang`, `tonemap.slang`, and `fill.slang` are visible to the user of the `utils` module, and these constituent helper files do not need to clutter the top-level file hierarchy.
227227

228228
## Legacy Modules
229229

0 commit comments

Comments
 (0)