[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: [ANN] printable.lua
- From: Dirk Laurie <dirk.laurie@...>
- Date: Wed, 9 Nov 2011 10:50:10 +0200
2011/11/9 Tom N Harris <telliamed@whoopdedo.org>:
> On 11/07/2011 03:43 PM, Dirk Laurie wrote:
>>
>> <https://sites.google.com/a/aims.ac.za/experimental-mathematics/lua>
>>
>
> What is the license for this module?
Thanks for pointing out the omission. The information is now on the
webpage and will later appear in the code itself. I've opted for the
same license as LÖVE: the zlib/libpng license
<http://www.opensource.org/licenses/Zlib>.
>
> Why do you put the option keys in the table, and not the metatable?
>
That is a very good question. I've been waiting for it :-)
Apart from the retort "why not in the table?", there are two reasons.
1. It is easier for the user to access and change them.
2. Subtables inherit via the `__index` metamethod.
Both are not insuperable: access methods can be provided, and there is
no reason why metatables can't have metatables themselves. If someone
can answer "why not?" cogently enough (e.g. by just going and doing
it), I'll consider that.
Dirk