[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: rename lua_State
- From: Dirk Laurie <dirk.laurie@...>
- Date: Mon, 25 Aug 2014 08:51:43 +0200
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.)
I asked him why he does not put FILENAME etc. He said:
"It's just a name. Use anything you can remember."
Now, I have almost four year's worth of C code full of
parameter lists starting
Lua_State *L,...
and I no longer even think of what I type before that *L.
It's just a name. I would be equally happy with PIET.
And I would hate, really hate, to change all that code.