Skip to content

Cover more material in scopes section - #434

Merged
bakpakin merged 1 commit into
janet-lang:masterfrom
sogaiu:tweak-scopes-section
Sep 2, 2026
Merged

Cover more material in scopes section#434
bakpakin merged 1 commit into
janet-lang:masterfrom
sogaiu:tweak-scopes-section

Conversation

@sogaiu

@sogaiu sogaiu commented Sep 1, 2026

Copy link
Copy Markdown
Collaborator

This PR is an attempt to address #431.

I think the points mentioned in the issue were covered. Please let me know if I missed something.

In addition, the suggested changes include:

  • Surfacing of "shadowing" a bit more in prose and in examples
  • Addition of some examples
  • Shortening some examples (slightly compensating for the additional text that makes the overall page longer)
  • Updating some comments in some examples (e.g. IIUC, some error messages have changed since the original writing)
  • Some rewording in a few places

Some specific points regarding mutation / removal of the original text:

  1. I replaced the sentence:

    Scopes are useful for organizing your bindings and they can expand your programs.

    with:

    Scopes are useful for organizing your bindings and can provide flexibility in expressing your programs.

    I hope that captured the spirit. I didn't really get what "expand" meant in the original 😅

  2. I removed a portion that recommends the use of let over that of do and def for at least two reasons:

    1. The existing text recommends let and then goes on to say that using do and def is fine, so it seemed that just not making the recommendation communicates almost the same idea...and that's shorter!
    2. In practice, I think there are some Janet-using folks [1] who actually prefer to use def over let in some situations [2].

[1] Disclosure: it's true that I'm one of those people...and you're going to have to work to convince me otherwise :)

[2] It might be of interest to eventually collect together more specifics on when to use one approach over the other, but I think this PR is too narrow to contain it :P

@pepe pepe left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

LGTM ❤️

@yohannd1

yohannd1 commented Sep 1, 2026

Copy link
Copy Markdown

Looks really nice as well imo! Thanks!

@sogaiu
sogaiu marked this pull request as ready for review September 2, 2026 00:07
@bakpakin
bakpakin merged commit e67c88e into janet-lang:master Sep 2, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants