lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]


Asko Kauppi wrote:

CreateMutex in Lua... **creeps** :P

While I feel some of OS API's are very nice to have, how far have you gone? I'm facing the same in deciding, which parts of Cocoa Foundation API's (OS X) to port. Decided to leave some parts strictly out, as unnecessary in a Lua world.

-asko

I've never used the Win32 API wrapper(s) so can't comment on those.

Speaking from my experience in binding APR, I've found that most of these `API primitives' are better wrapped in a higher level interface (am I stating the obvious?). This has the added advantage that the API you provide to Lua becomes less dependent on the API your binding. Of course in the case of Win32 it seems less relevant to defend yourself against API changes (because of Win32's extensive backcompat).

On the flip side, when you expose all the primitives, a higher level API can be written in Lua.

 - Peter Odding