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

Clarifications related to maybe keyword #674

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

UltraGreed
Copy link
Contributor

@UltraGreed UltraGreed commented Jun 29, 2024

The description of usage of the keyword maybe seems vague, so I propose the following extension of docs:

maybe may be maybe, may be true, and may be false.

print(maybe == maybe)! // maybe
print(maybe == true)! // maybe
print(maybe == false)! // maybe

If statement with maybe in its condition may or may not be executed.

if (maybe) {
   print("Yes")! // this may be executed
} else {
   print("No")! // this may be executed too
}

This approach fits the concept of storing a boolean in 1.5 bits and I think is idiomatically consistent with the DreamBerd language.

@UltraGreed
Copy link
Contributor Author

The issue has already been raised in #235 and some duplicates

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.

None yet

1 participant