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

Bools #112

Open
skaller opened this issue Dec 1, 2017 · 0 comments
Open

Bools #112

skaller opened this issue Dec 1, 2017 · 0 comments

Comments

@skaller
Copy link
Member

skaller commented Dec 1, 2017

Felix at present has types bool and cbool. Bool is the compact linear type 2, cbool is the C++ bool type. These behave the same, however, arrays of 2 are more compact, but limited to 64 bits. On the other hand cbool is addressable.

However you cannot pattern match directly on a cbool, nor is there any natural name for the two truth values, since the parser defines true and false as values of type bool.

I think cbool should be renamed bool, and 2 should be named bit.
Thus, the user will expect a compact bitarray without addressability.
However this requires inventing distinct names for the truth values or the cbool kind,
and adding to pattern matching directly since you cannot match against constants,
only literals.

On the other hand, compact linear types are now, in fact, addressable,
in the sense we have special pointers to them.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant