Hacker News new | ask | show | jobs
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.

1 comments

Exposing how? If you mean documentation, Buzz as not yet its reference manual but it'll definitely be there.
Lua has the same strategy as Buzz around numbers see https://www.lua.org/manual/5.4/manual.html#2.1
> Exposing how? If you mean documentation

No I mean as an actual type, instead of `num` juggling representation internally.