diff --git a/content/docs/components/classes.mdx b/content/docs/components/classes.mdx index d87b707..0eb3180 100644 --- a/content/docs/components/classes.mdx +++ b/content/docs/components/classes.mdx @@ -60,5 +60,5 @@ impl fmt::Display { - **Unified Scope**: Data, behavior, and trait logic live in one place, eliminating the friction of jumping between `struct` and `impl` blocks. - **Explicit Context**: The use of `self*` ensures that the relationship between a method and its instance is always transparent. -- **Encapsulation**: Visibility modifiers (`public`) allow you to expose a clean API while keeping internal helper methods and state private to the class. +- **Encapsulation**: Visibility modifiers (`pub`) allow you to expose a clean API while keeping internal helper methods and state private to the class. - **Zero-Cost Classes**: Under the hood, Mist desugars these into idiomatic Rust structs and implementation blocks, ensuring no runtime overhead compared to raw Rust. diff --git a/content/docs/components/enums.mdx b/content/docs/components/enums.mdx index 09fd73e..6405c46 100644 --- a/content/docs/components/enums.mdx +++ b/content/docs/components/enums.mdx @@ -53,5 +53,5 @@ public enum Validation<'a, T> { - **Consistent Member Declaration**: Struct-like variants maintain the `type name` order, ensuring that data modeling feels identical whether you are defining a top-level `struct` or an `enum` variant. - **Rust-Native ADTs**: Enums compile directly to Rust enums, allowing for exhaustive pattern matching and zero-cost abstraction. -- **Shared Visibility**: The `public` modifier at the enum level exports all variants for use in other modules, matching Rust's visibility rules for enums. +- **Shared Visibility**: The `pub` modifier at the enum level exports all variants for use in other modules, matching Rust's visibility rules for enums. - **Comma-Separated Members**: Fields within struct-like variants are separated by commas, mirroring the syntax used in standard Mist structs. diff --git a/content/docs/components/functions.mdx b/content/docs/components/functions.mdx index eba55cf..cff5694 100644 --- a/content/docs/components/functions.mdx +++ b/content/docs/components/functions.mdx @@ -22,7 +22,7 @@ void log_status(str* message) { ## Visibility & Exports -Functions are private to their module by default. The `public` modifier exports the function for cross-module access. +Functions are private to their module by default. The `pub` modifier exports the function for cross-module access. ```mist public i32 get_version() { diff --git a/content/docs/components/structs.mdx b/content/docs/components/structs.mdx index b65227c..2151d13 100644 --- a/content/docs/components/structs.mdx +++ b/content/docs/components/structs.mdx @@ -20,7 +20,7 @@ public struct Task { ## Visibility -Use the `public` modifier to make the struct or its individual fields accessible from other modules. +Use the `pub` modifier to make the struct or its individual fields accessible from other modules. ```mist public struct NetworkNode { @@ -57,4 +57,4 @@ public struct Buffer<'a, T> { - **Type-First Declaration**: Fields use the `type name` order to match function parameters and variable declarations. - **Comma-Separated Members**: Fields are separated by commas, maintaining a clean and consistent delimiter style. - **Rust Compatibility**: Maps 1:1 to Rust structs, ensuring zero-cost abstraction and full ecosystem interoperability. -- **Direct Visibility**: The `public` keyword replaces `pub` for a more consistent modifier language across the codebase. +- **Direct Visibility**: The `pub` keyword replaces `pub` for a more consistent modifier language across the codebase. diff --git a/content/docs/limitations.mdx b/content/docs/limitations.mdx index 07f5988..dba83ec 100644 --- a/content/docs/limitations.mdx +++ b/content/docs/limitations.mdx @@ -53,7 +53,7 @@ Inheritance is a major planned feature but is currently **not implemented**. Be aware that because we are focusing on syntax, keywords and structures may change between minor versions. Currently: -* **Access Modifiers:** `public` and private defaults are being tested for various contexts (classes vs. structs, or `public(crate)`). +* **Access Modifiers:** `pub` and private defaults are being tested for various contexts (classes vs. structs, or `public(crate)`). * **Pointers vs. References:** The `*` syntax for references (e.g., `self mut*`) is the current standard but is subject to refinement based on ecosystem feedback.