Open HuseyinSimsek7904 opened 6 months ago
Agreed, sized types are cool! But how about
i8 // 1 byte signed integer
u8 // 1 byte unsigned integer
i16 // 2 byte signed integer
u16 // 2 byte unsigned integer
i32 // 4 byte signed integer
u32 // 4 byte unsigned integer
i64 // 8 byte signed integer
u64 // 8 byte unsigned integer
I like these kinds of type notations which Rust also uses. But I also want to add some aliases for the i8
, u8
, i64
and u64
types; char
, byte
, int
, uint
.
Is this convention understandable @Utkub24, what do you think?
These types will also require a new integer parsing system that allows postfixes to the integers like u
, u16
, i32
, etc... For example 34u16
will push a 16-bit unsigned integer that has the value 34.
I am not very sure about the syntax tho.
I like these kinds of type notations which Rust also uses. But I also want to add some aliases for the
i8
,u8
,i64
andu64
types;char
,byte
,int
,uint
.Is this convention understandable @Utkub24, what do you think?
Just pick one and be consistent imo, the user can define aliases for them if they so desire.
(use i16
notation)
Currently, the compiler only recognizes
int
intrinsic type. These should also be implemented:We should also update the load intrinsics so that they push the correct size of integer after reading. Same applies to the store intrinsics as well.