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

Support Boolean type #51

Open
iilyak opened this issue Jul 13, 2023 · 1 comment
Open

Support Boolean type #51

iilyak opened this issue Jul 13, 2023 · 1 comment
Labels
enhancement New feature or request

Comments

@iilyak
Copy link

iilyak commented Jul 13, 2023

I couldn't find a way to use bool. Interim I am trying to use:

enum Bool: 1 {
    false = 0,
    true = 1
}
@hchataing
Copy link
Collaborator

That's definitely something we think about having !
We were reluctant to add this before for several reasons:

  • the use of true / false is often ambiguous, we encourage defining a custom enum with unambiguous names of 0 and 1.
  • we aren't sure if booleans of width greater than 1 should be allowed or not, with which semantics, and how the syntax should be modified for this

@hchataing hchataing added the enhancement New feature or request label Aug 12, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants