Re:Show HN: Buzz, strongly typed scripting language written ...
by giann on Monday November 21, 2022 @10:17AM
(#33693480)
Exposing how? If you mean documentation, Buzz as not yet its reference manual but it'll definitely be there.
Re:Show HN: Buzz, strongly typed scripting language written ...
by masklinn on Monday November 21, 2022 @10:20AM
(#33693516)
> Exposing how? If you mean documentation
No I mean as an actual type, instead of `num` juggling representation internally.
Re:Show HN: Buzz, strongly typed scripting language written ...
by giann on Monday November 21, 2022 @10:24AM
(#33693570)
Lua has the same strategy as Buzz around numbers see https://www.lua.org/manual/5.4/manual.html#2.1
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.