|
On 14/07/16 02:29 PM, Luiz Henrique de Figueiredo wrote:
But that's opt-in, which means you can't pass the bigint into code you don't control.To put it simply, it lets you use bigints as table keys as if they were plain lua ints or floats. E.g. local b1 = require("bigint").one local i = 1 local f = 1.0 local t = {"one"} print(t[b1], t[i], t[f]) --> one one one print(type(b1), math.type(i), math.type(f)) --> userdata integer floatThis should be easy to do using a proxy table with an appropriate __index.
-- Disclaimer: these emails may be made public at any given time, with or without reason. If you don't agree with this, DO NOT REPLY.