Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add :unless modifier to (doc loop) #1296

Merged
merged 2 commits into from
Sep 22, 2023

Conversation

Andriamanitra
Copy link
Contributor

:unless was added in 1.31.0 (#1289) but never documented

Copy link
Member

@pepe pepe left a comment

Choose a reason for hiding this comment

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

LGTM

@sogaiu
Copy link
Contributor

sogaiu commented Sep 21, 2023

On a side note, there appears to be docstring content (here and elsewhere) where there are phrases such as:

  • "when condition is true"
  • "when condition is false"
  • "if expression is falsey"
  • "if expression is truthy"

In this particular docstring, there appear to be a mix (e.g. true and truthy).

Do we want to be using truthy and falsey in some of these cases where true and false are being used?

@bakpakin
Copy link
Member

bakpakin commented Sep 21, 2023

truthy/falsey is more precise here since any non-nil, non-false value will behave as true, and nil will work as false (like most conditions).

@Andriamanitra
Copy link
Contributor Author

truthy/falsey is more precise here since any non-nil, non-false value will behave as true, and nil will work as false (like most conditions).

That's a good point – I changed both when and unless to say truthy/falsey.

@bakpakin bakpakin merged commit c31314b into janet-lang:master Sep 22, 2023
8 checks 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