[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: The hypothetical __serialize metamethod (was Re: [ANN] luaproc 1.0-4)
- From: Andrew Starks <andrew.starks@...>
- Date: Tue, 6 Oct 2015 14:12:07 -0500
On Tue, Oct 6, 2015 at 12:59 PM, Coda Highland <chighland@gmail.com> wrote:
> If you're worried about a collision with some future PUC-Rio extension
> to the language, then call it "serialize_json" or something instead of
> using __ as a prefix. It can still be stored in the same place on the
> metatable.
>
> /s/ Adam
I don't have a sense that this could be turned into a new metamethod
for 5.4. It's just a solution that has worked well for me and has
persisted to work well and not smell... yet.
I think that it would be useful in a library like luaproc, which could
specify the expected behavior of such a method and provide a default
__serialize methods that would probably work for most cases.
-Andrew
- References:
- [ANN] luaproc 1.0-4, Alexandre Skyrme
- Re: [ANN] luaproc 1.0-4, Alexandre Skyrme
- Re: [ANN] luaproc 1.0-4, Hisham
- Re: [ANN] luaproc 1.0-4, Sean Conner
- Re: [ANN] luaproc 1.0-4, Rena
- Re: [ANN] luaproc 1.0-4, Andrew Starks
- The hypothetical __serialize metamethod (was Re: [ANN] luaproc 1.0-4), Sean Conner
- Re: The hypothetical __serialize metamethod (was Re: [ANN] luaproc 1.0-4), Coda Highland
- Re: The hypothetical __serialize metamethod (was Re: [ANN] luaproc 1.0-4), Sean Conner
- Re: The hypothetical __serialize metamethod (was Re: [ANN] luaproc 1.0-4), Coda Highland