rescript-compiler icon indicating copy to clipboard operation
rescript-compiler copied to clipboard

Bitwise operators

Open soanvig opened this issue 1 year ago • 4 comments

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

soanvig avatar Sep 05 '24 00:09 soanvig

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

mununki avatar Sep 05 '24 01:09 mununki

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.

soanvig avatar Sep 05 '24 08:09 soanvig

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

fhammerschmidt avatar Sep 05 '24 12:09 fhammerschmidt

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

cometkim avatar Sep 05 '24 19:09 cometkim

#7171 and #7172 will be done in v12

cometkim avatar Mar 23 '25 12:03 cometkim