[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: How close to C do you make your binding?
- From: Ką Mykolas <kamicc@...>
- Date: Fri, 20 Jun 2014 01:21:40 +0300
In my personal opinion, writing Lua modules too close C level --- is
just like handycapping Lua developers who are going to use Your
module(s). If developer wanted as low as C level --- he/she would have
chosen C instead of Lua. So, basically, Lua tools, ideas and paradigms
for writing Lua modules. C tools, ideas and paradigms for writing C
modules.
On 6/19/14, Ico Doornekamp <lua@zevv.nl> wrote:
> * On 2014-06-19 19:53:35 +0200, William Ahern wrote:
>
>> > This is true, and appears to save the binder writing documentation
>> > for the idiomatic Lua API. It makes sense to the binder, because
>> > they're fluent in C and can read any tutorials for the C API. But
>> > it poses a problem to a more casual user, who may not know C. So
>> > it's worth going the extra mile; and the thread (of course Coda!) is
>> > about doing the extra idiomatic layer in _addition_. Depends
>> > totally on the intended audience of course.
>>
>> And the C API! A good C API is modular and consistent, and ideally
>> eschews things like callbacks
>
> It's especially challenging to create bindings for C libraries which
> perform callbacks from the context of some internal hidden thread.
> Unfortunately people still make this kind of API's.
>
> --
> :wq
> ^X^Cy^K^X^C^C^C^C
>
>