[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: Why Lua is not more popular
- From: Marc Balmer <marc@...>
- Date: Mon, 23 Sep 2013 18:08:39 +0200
Am 23.09.13 11:04, schrieb Rena:
> 2013/9/17 Sean Conner <sean@conman.org <mailto:sean@conman.org>>
>
>
> Another thing I've found (by doing Lua bindings by hand) is that a
> mechanical approach really doesn't make for good Lua bindings.
> Such a
> mechanial approach to syslog() would end up with:
>
> syslog(5,string.format("The foo is %s",status))
>
> Or ...
>
> LOG_NOTICE = 5
> syslog(LOG_NOTICE,string.format("The foo is %s",status))
>
> Or
>
> syslog("LOG_NOTICE",string.format("The foo is %s",status))
>
> Doing it by hand, I did [1]:
>
> syslog('notice',"The foo is %s",status)
>
> which is MUCH nicer (IMHO) than other syslog() interfaces for
> Lua I've seen.
>
> -spc
>
> [1]
> https://github.com/spc476/lua-conmanorg/blob/master/src/syslog.c
>
>
> I'd go one step further and do: syslog.notice("The foo is %s", status)
> which incidentally happens to be exactly the interface for a log library
> I wrote a while ago.
Good idea, really. I guess my unix binding will use thise, too, quite
soon ;)
>
>
> --
> Sent from my Game Boy.
- References:
- Why Lua is not more popular, Pierre Chapuis
- Re: Why Lua is not more popular, Tim Hill
- Re: Why Lua is not more popular, Pierre Chapuis
- Re: Why Lua is not more popular, steve donovan
- Re: Why Lua is not more popular, Andrew Starks
- Re: Why Lua is not more popular, D. Matt Placek
- Re: Why Lua is not more popular, Steve Litt
- Re: Why Lua is not more popular, Andrew Starks
- RE: Why Lua is not more popular, Dan Tull
- Re: Why Lua is not more popular, Sean Conner
- Re: Why Lua is not more popular, Dong Feng
- Re: Why Lua is not more popular, Rena