lua-users home
lua-l archive

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


On Mon, Mar 14, 2016 at 5:06 PM, ThePhD <jm3689@columbia.edu> wrote:
> Dear Everyone,
>
> [long rant]

I agree. Although I've not dug into it much, and not tried to write
any code for it, I prefer Python's C API over Lua's, because Python
defines a `PyObject *` pointer that can be used to point to an
arbitrary Python value, without need for complicated stack operations.
And building on that, Python functions written in C receive their
positional arguments as a `PyObject *` tuple passed directly as an
actual argument to the C function. (The method of unpacking that tuple
into C values is a bit clunky, but in my uneducated opinion, worth the
trade-off.)

I'd love to see something similar to that for Lua.