[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: [Feature Request?] __key
- From: Luiz Henrique de Figueiredo <lhf@...>
- Date: Thu, 14 Jul 2016 14:29:38 -0300
> 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 float
This should be easy to do using a proxy table with an appropriate __index.