[Date Prev][Date Next][Thread Prev][Thread Next]
- Subject: Re: About function environments
- From: Roberto Ierusalimschy <roberto@...>
- Date: Tue, 07 Oct 2003 09:06:19 -0300
> >I am confused whether it is possible to associate the environment of
> >a Lua function with a C function. The manual seems to imply this is
> >not possible, but does not say so explicitly.
> Is there any particular reason why this is not possible?
No strong reason. Mainly we felt that C functions do not need this
facility, because in C it is almost as easy to access any table field
as to access a global variable. Moreover, we did not want Lua to be able
to change the way a C function works (by changing its environment).