Refactor: Clarify Block as the core construct

This commit is contained in:
2025-09-24 07:47:19 -07:00
parent d8712dfe1e
commit 6332c3a1b8

View File

@@ -94,8 +94,8 @@ version: 1.0 // Declaration and initialization
version = 1.1 // Assignment version = 1.1 // Assignment
\`\`\` \`\`\`
## The Block: Unifying Objects and Functions ## The Block: The Core Construct
The **Block** (\`{}\`) is Hi's foundational structure, unifying data objects and executable functions. It is a sequence of expressions that can be invoked with \`()\`. Every Hi file is an implicit **Block** (\`{}\`). It is the language's universal construct, unifying scopes, data structures (objects), and executable code (functions). A block is a sequence of expressions that can hold data or be invoked with \`()\`.
### As a Data Structure (Object) ### As a Data Structure (Object)
A block can hold \`key: value\` pairs. A \`#\` prefix denotes a private property. A block can hold \`key: value\` pairs. A \`#\` prefix denotes a private property.