Skip to content

Commit a3aa732

Browse files
committed
add a future consideration
1 parent 5534179 commit a3aa732

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

text/0001-int.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -117,6 +117,8 @@ let exponentiate = (x, y) => {
117117

118118
## API consideration
119119

120+
TBD
121+
120122
## Questions
121123

122124
### Why do we even use `int`?
@@ -135,6 +137,12 @@ It is also for backward compatibility. Bounds-checking and failure early may be
135137

136138
The `number | 0` is actually the most concise output form we can consistently use. Introducing any other runtime codes universally would lead to significant code bloat in the output.
137139

140+
### Can we somehow make it match JavaScript's `number`?
141+
142+
Perhaps in the future, we can make our number literals actually match JavaScript's number semantics. We could also rename `int` to `int32` and assign another literal like `0l`, as it was in OCaml syntax.
143+
144+
However, this is not something that will happen in the near future. It won't occur until we are confident in our migration strategy to avoid breaking existing codebases. If done incorrectly, it could completely break compatibility with existing code.
145+
138146
## Future posibilities
139147

140148
Guaranteeing the use of int32 types may offer additional advantages in the future when targeting WebAssembly or alternative native backends.

0 commit comments

Comments
 (0)