[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: Lua Ecosystem
- From: "Pierre Chapuis" <catwell@...>
- Date: Wed, 27 Nov 2013 14:32:06 +0100
> It was thus said that the Great Rena once stated:
> Now, as to the difference between:
>
> syslog('error',"warning: x=%d",d)
>
> and
>
> syslog.error("warning: x=%d",d)
>
> is a matter of taste. I prefer the former, as it's actually less code
> (one
> function vs. eight). The later seems popular with the OO crowd (in my
> opinion).
Supporting the latter when you have the former
is just a matter of adding an __index metamethod
to a table. You can easily support both by having
both __index and __call.
--
Pierre Chapuis
- References:
- Lua Ecosystem, Dirk Laurie
- Re: Lua Ecosystem, Sean Conner
- Re: Lua Ecosystem, Michael Richter
- Re: Lua Ecosystem, Pierre Chapuis
- Re: Lua Ecosystem, Sean Conner
- Re: Lua Ecosystem, Pierre Chapuis
- Re: Lua Ecosystem, Sean Conner
- Re: Lua Ecosystem, Michal Kolodziejczyk
- Re: Lua Ecosystem, Sean Conner
- Re: Lua Ecosystem, Rena
- Re: Lua Ecosystem, Sean Conner