lua-users home
lua-l archive

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


On Aug 24, 2014, at 11:51 PM, Dirk Laurie <dirk.laurie@gmail.com> wrote:

> 2014-08-24 22:02 GMT+02:00 Thijs Schreijer <thijs@thijsschreijer.nl>:
>> As "lua_State" not actually refers to a state, but to a thread
>> or an execution stack, could it be renamed? To something that
>> properly reflects what it is?
> 
> -1.
> 
> I'm not going to argue, though one could, about "state" in terms
> of Turing machines. The issue is more practical.
> 
> When I was a junior programmer, I often asked a certain senior
> colleague for help. Invariably, when the question involved some
> user-supplied name, such as a filename, he would put "PIET"
> in his example. (That is one of the most common nicknames
> for a male in my country.)

So it’s going to be lua_PIET now? :)

-1 for me too, I see no problem with the existing name, particularly as most C code doesn’t really care which lua_State it is given; it just uses it as “the current state”.

However, I think a paragraph or two in the reference manual clarifying the relationship between Lua states, stack and the “shared” state (registry etc) would be useful for those starting out with the C API.

—Tim