rescript-lang / rescript-compiler

The compiler for ReScript.
https://rescript-lang.org
Other
6.65k stars 442 forks source link

Bitwise operators #7009

Open soanvig opened 1 week ago

soanvig commented 1 week ago

Rescript lacks support for bitwise operators: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators#binary_bitwise_operators

I found: https://github.com/rescript-lang/rescript-compiler/issues/5176 marked as completed

But I don't see anything in the docs or the source code

mununki commented 1 week ago

Hi, We have some: https://github.com/rescript-lang/rescript-compiler/blob/master/jscomp/stdlib-406/pervasives.res#L87-L95

soanvig commented 1 week ago

Thank you very much.

There I think pervasives is not documented anywhere on the rescript page, am I right? Can't find them in API ref.

fhammerschmidt commented 1 week ago

That's deliberate, Pervasives will be removed so the bitwise functions from there should probably just go to https://rescript-lang.org/docs/manual/latest/api/core/int

cometkim commented 1 week ago

@cknitt Should we leave it at #6984? I think we'll eventually have to introduce operators with a JS-like syntax.