[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: Self-initializing tables
- From: Dirk Laurie <dirk.laurie@...>
- Date: Tue, 23 Feb 2016 11:07:00 +0200
2016-02-23 7:45 GMT+02:00 Philipp Janda <siffiejoe@gmx.net>:
> Am 23.02.2016 um 06:24 schröbte Dirk Laurie:
>
>> A module is attached that contains the following comments:
>>
>> -- Self-initializing table. The point is that `tbl[key]` is never nil.
> ...
>> Something like this may well have been done before. Please supply
>> pointers; I'll gladly concede priority.
>
>
> http://lua-users.org/wiki/AutomagicTables
Thanks for the reference. Just getting to understand why that
version manages to work without using rawget was an education.
I like my version better. Don't we all? :-)