From a967bce47f3d36d5abaf5d824928105dc6873516 Mon Sep 17 00:00:00 2001 From: Timothy DeHerrera Date: Fri, 2 Aug 2024 00:15:42 -0600 Subject: [PATCH] doc: explain `pub` and add features --- README.md | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 85ee551..479a678 100644 --- a/README.md +++ b/README.md @@ -14,7 +14,9 @@ code without having to perform a full evaluation. This could be used, e.g. to sh - **Modular Structure**: Organize Nix code into directories, each defined by a `mod.nix` file. - **Automatic Importing**: Nix files in a module directory are automatically imported. - **Isolation**: Modules are imported into the Nix store, enforcing boundaries and preventing relative path access. -- **Scoping**: Each module and member has access to `self`, `super`, `atom`, and `std`. +- **Introspection**: Unlike legacy modules, code is specified in its final form instead of as prototypes (functions), leading to much better and simpler introspective analysis. +- **Simplicity**: The system is kept purposefully simple and flexible in order to remain performant and flexible. +- **Scoping**: Each module and member has access to `self`, `super`, `atom`, `pub` and `std`. - **Standard Library**: Includes a standard library (`std`) augmented with `builtins`. ## How It Works @@ -29,6 +31,7 @@ code without having to perform a full evaluation. This could be used, e.g. to sh - `super`: Parent module (if applicable). - `atom`: Top-level module. - `std`: Standard library and `builtins`. + - `pub`: External resources, such as other atoms, free-form nix expressions, remote sources, etc. 3. **Composition**: Modules are composed recursively, with `mod.nix` contents taking precedence.