|
|
|
|
|
by masklinn
1309 days ago
|
|
Segmenting the two and performing conversions implicitly as necessary is fairly standard, the only thing that would be required is... exposing the current implicit behaviour. Python, Ruby, or Lua do that. That's less "nonsense" than doing the same but hiding it from the user. "num" also gives a false impression: before checking, I expected JS's (or Lua < 5.3) behaviour: everything is a double, and you only get 53 bits of integer precision (which is quite frustrating). An alternative if you want > simple and relatively high level is to use decimals, at the cost of complicating the implementation. |
|