mirror of
https://github.com/hi-language/hi-language.github.io.git
synced 2026-01-14 00:28:05 +00:00
Refactor: Clarify Block as the core construct
This commit is contained in:
@@ -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.
|
||||||
|
|||||||
Reference in New Issue
Block a user