[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: [ANN] Lua 5.3.0 (work2) now available (number coercion holy crusade)
- From: Dirk Laurie <dirk.laurie@...>
- Date: Tue, 25 Mar 2014 08:21:30 +0200
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.
It could operate via a mask with a bit for each metamethod,
so one could switch only certain metamethods on/off.
The mask would be interrogated only when a metamethod is
about to be called, so there would not be any overhead for
programs that do not use metamethods.
It might be possible to implement it almost painlessly via tag
methods (ltm.h/ltm.c).
- References:
- [ANN] Lua 5.3.0 (work2) now available, Luiz Henrique de Figueiredo
- Re: [ANN] Lua 5.3.0 (work2) now available, Egor Skriptunoff
- Re: [ANN] Lua 5.3.0 (work2) now available, Roberto Ierusalimschy
- Re: [ANN] Lua 5.3.0 (work2) now available, Andrew Starks
- Re: [ANN] Lua 5.3.0 (work2) now available, Roberto Ierusalimschy
- Re: [ANN] Lua 5.3.0 (work2) now available (number coercion holy crusade), katlogic
- Re: [ANN] Lua 5.3.0 (work2) now available (number coercion holy crusade), Roberto Ierusalimschy
- Re: [ANN] Lua 5.3.0 (work2) now available (number coercion holy crusade), Hisham
- Re: [ANN] Lua 5.3.0 (work2) now available (number coercion holy crusade), Rena
- Re: [ANN] Lua 5.3.0 (work2) now available (number coercion holy crusade), William Ahern
- Re: [ANN] Lua 5.3.0 (work2) now available (number coercion holy crusade), Andrew Starks
- Re: [ANN] Lua 5.3.0 (work2) now available (number coercion holy crusade), Dirk Laurie
- Re: [ANN] Lua 5.3.0 (work2) now available (number coercion holy crusade), Tim Hill
- Re: [ANN] Lua 5.3.0 (work2) now available (number coercion holy crusade), Coroutines