[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: ctb macro and BIT_ISCOLLECTABLE
- From: Dibyendu Majumdar <mobile@...>
- Date: Fri, 5 Jun 2015 16:29:09 +0100
On 5 June 2015 at 16:04, Dirk Laurie <dirk.laurie@gmail.com> wrote:
> 2015-06-05 16:35 GMT+02:00 Dibyendu Majumdar <mobile@majumdar.org.uk>:
>
>> Didn't realize that Lua types have a metatable associated with them.
>> What are they used for?
>
> Fooling around, mostly. There have been interesting posts on this
> list on what you can do with metatables for nil and function, for
> example. In the case of string, of course, the metatable is already
> exploited by the string library.
>
To support indexing of a string's characters via [] it seems.
Interesting.