-
Notifications
You must be signed in to change notification settings - Fork 453
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
Modulus Operator #6455
Comments
No plans, but there is a built-in function that you can use with the pipe-operator let a = b->mod(c) ReScript tries to keep the reserved keyword space as small as possible and decided to make almost everything a function instead of an infix operator. There exists also a prototype for custom infix operators which would enable you to assign the modulo function to an arbitrary string, but there seems not to be too much interest by the community. OTOH I guess a fixed |
@fhammerschmidt Thanks, |
Since ReScript is promoting syntactic features that make it look more like JS, I think it's a good idea to have the %, <<, >>, >>>, **, etc. be the same. |
@namenu I agree, although On a good note, I like that Rescript is TRUE static typing and can really be a contender in the cross-platform space. Can you guys please consider completing the arithmetic components of your compiler? |
any other existing JS operators too. |
We're starting a new project that will use tons of animation and decided Rescript is a strong candidate - we love it's support for React. During our testing phase we discovered there seems to be no modulus operator, for exmaple:
let a = b mod c;
This is well implemented in Reason, https://reasonml.github.io/api/Pervasives.html#VAL(mod).
Are there any plans to add support for this in Rescript?
The text was updated successfully, but these errors were encountered: