motoko-base
motoko-base copied to clipboard
Possible improvements for `Int8/16/32/64`
Possible improvements for Int8.mo
, Int16.mo
, Int32.mo
, and Int64
:
- Support matchers with Int8/16/32/64/Nat8/16/32/64/Float/Order Testable.
- Inconsistent naming of functions, e.g.
bitrotLeft()
(instead ofbitRotLeft()
). - Inconsistent type of second argument in bit operations:
bitshiftLeft()
usesInt64
butbittest()
usesNat
.
Already fixed by PR https://github.com/dfinity/motoko-base/pull/478:
- Minimum value and maximum value constants are missing.
-
bitnot()
has a superfluous second argument:bitnot(x, y)
should bebitnot(x)
.