lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]


On Mar 24, 2014, at 11:21 PM, Dirk Laurie <dirk.laurie@gmail.com> wrote:

> 2014-03-25 7:38 GMT+02:00 Coroutines <coroutines@gmail.com>:
> 
>> This led me to think maybe it would be
>> useful if you could set a marker before and after a section of code
>> where between which no metamethods will be called.  Rather than have
>> rawget/rawset() you'd have something like:
>> 
>> meta:no
>>  local t = whatever.index
>>  t()
>> meta:yes
>> 
>> Disregard the odd syntax, but the idea (I think) is an interesting one
>> -- rather than having an expanding set of raw*() functions.
> 
> I like the idea of switching metamethods off and on — but dynamically,
> not lexically scoped. Via routines in the debug library.
> 

Why the debug library? IMHO the debug library shouldn’t really be used for production code .. if it is, then it’s not really a debug library any more except in name.

—Tim