rescript-lang / rescript

ReScript is a robustly typed language that compiles to efficient and human-readable JavaScript.
https://rescript-lang.org
Other
6.76k stars 453 forks source link

Bitwise operators #7009

Open soanvig opened 2 months ago

soanvig commented 2 months 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 2 months ago

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

soanvig commented 2 months 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 2 months 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 2 months ago

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