Skip to content

Conversation

@jeshecdom
Copy link
Contributor

Closes #1467.

Copy link

@github-actions github-actions bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the update—languages/fift/variables.mdx: one inline suggestion to align the wording with your style guide. Please apply the inline suggestion.

Comment on lines 181 to 186
// Define word x so that it reads the box contents.
// Now, x can be treated as if
// it was the "variable".
// In other words, instead of writing "x-box @"
// to read the variable contents, simply write "x".
{ x-box @ } : x
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[HIGH] Banned filler word “simply” in body text

The comment explaining the getter x includes the phrase “simply write x” on these lines. The extended style guide explicitly bans filler and hedging terms like “simply” in instructional text and requires neutral, precise wording instead, so this phrasing violates a MUST-NOT rule and creates an inconsistent tone. Replacing “simply” with neutral language keeps the instruction clear while aligning with the documented style requirements, as outlined in https://github.com/ton-org/docs/blob/main/contribute/style-guide-extended.mdx?plain=1#L214-L220.

Suggested change
// Define word x so that it reads the box contents.
// Now, x can be treated as if
// it was the "variable".
// In other words, instead of writing "x-box @"
// to read the variable contents, simply write "x".
{ x-box @ } : x
// Define word x so that it reads the box contents.
// Now, x can be treated as if
// it was the "variable".
// In other words, instead of writing "x-box @"
// to read the variable contents, write "x".
{ x-box @ } : x

Please leave a reaction 👍/👎 to this suggestion to improve future reviews for everyone!

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done.

Copy link
Collaborator

@pyAndr3w pyAndr3w left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍


## Words

A _word_ is an identifier for an execution token, also known as a `WordDef`. To define a new word, first define a `WordDef` by enclosing code inside `{ }`; then invoke word `:` followed by the identifier for the word. For instance,
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

phrase

identifier for an execution token, also known as a WordDef

may be confusing after editing types.mdx


## Variables

_Variables_ are a much more efficient way to represent changeable values. To declare a variable, use the word `variable` followed by the identifier. Internally, the word `variable` creates an empty box, which can then be updated with word `!`, and read with word `@`.
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would show that variable x is the same as hole constant x and link to { hole constant } : variable in Fift.fif.

// it inside the block/execution token.
does // Stack: { Box WordDef-for-! execute }
// Assign the block/execution token { Box WordDef-for-! execute }
// to the second string comming after the invocation of variable-get-set
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

fix the comment typo comming > coming

y // Top of stack has 5
```

For more details on blocks/execution tokens and words `' <WORD_NAME>` and `execute`, refer to the Blocks Section in the Control Flow page. For more details on words `create`, `' <WORD_NAME>`, `does`, refer to Sections [4.5](/languages/fift/whitepaper#4-5-defining-words-and-dictionary-manipulation), [4.6](/languages/fift/whitepaper#4-6-dictionary-lookup), and [4.7](/languages/fift/whitepaper#4-7-creating-and-manipulating-word-lists) in the Fift whitepaper.
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

add link to /languages/fift/control#blocks

@pyAndr3w pyAndr3w marked this pull request as draft December 11, 2025 12:55
@anton-trunov anton-trunov added the 3p Reviewed by someone else (a third party). Used for filtering PRs. Don't mind this. label Dec 11, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

3p Reviewed by someone else (a third party). Used for filtering PRs. Don't mind this.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Fift > Constants, Variables, Words]

4 participants