-
Notifications
You must be signed in to change notification settings - Fork 661
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
[Feature] Char Operations #946
Comments
A few things here: Second for implementing + and - which of the following should we allow or both? |
We could go either way in regard to |
The first example
would be a type error, because The second example
would be legal if we decide to support |
Got it, then I suppose the question is, do we want to allow the |
I personally don't have a strong opinion one way or the other. Maybe a very small preference for @gluax What do you prefer? What about @bendyarm @damirka @Protryon @collinc97 @howardwu? (We can always defer the decision -- not needed for an MVP.) |
I would personally go for the Rust route of not allowing it. |
I agree with @gluax . Supporting The rust motivation for disallowing |
I think it's fine to go the Rust route, but I'll just point out for completeness that we could make operations that yield noncharacters illegal in the same way in which we can make additions that overflow illegal -- checked on actual inputs via interpretation. |
The initial design allows any value between 0 and 10FFFF in |
Since in Leo we have concrete inputs at compile time, we can do things cheaply that would be expensive in "traditional" languages. |
@acoglio Maybe, for now, we can pull out the two operations from this issue and into a new one as I don't believe they are necessary for an MVP. |
@gluax Yes, that sounds like a good idea. I think that Do you know if we have snarkVM targets for the ordering operations on field elements? (For |
@acoglio I just asked Collin about that; it should be in with Whether we decide to implement those or not is another question and I can update #950 accordingly. I don't think it should be too much work imo. |
🚀 Feature
This allows operations +,-,==,!=,<=,<,>=,> to be used with the
char
type.Depends on #939.
Depends on #940.
Depends on #942.
Depends on #950.
Motivation
This helps the implementation goal of #929.
Users should be able to perform equality and other basic operations with the type.
Implementation
Operators
Tests
The text was updated successfully, but these errors were encountered: