Open
Description
Is your feature request related to a problem? Please describe.
Amber has no way to represent integer types. Sometimes we may want to accept type that can be represented as an integer. Here are main pros:
- Not every environment comes with
bc
installed - Sometimes some calculations have to be done quickly and so calling
bc
will only slow things down
Describe the solution you'd like
- Add
Int
data type - Numeric value that contains
.
symbol is aNum
- Numeric value that is an integer is an
Int
- Handle
as
andis
operator withInt
- Add arithmetic operations for
Int
values -
len
builtin now returnsInt
value -
fail
statement only acceptsInt
value -
status
returns anInt
- Accessor expression accepts an
Int
instead ofNum
- Ranges now work on
Int
instead ofNum
- Lexical comparison works only on
Int
arrays - Update documentation covering
Int
data type
Describe alternatives you've considered
N/A
Additional context
#70