[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: os.setenv()???
- From: Rici Lake <lua@...>
- Date: Sun, 8 Jan 2006 17:15:02 -0500
On 8-Jan-06, at 5:04 PM, Ryanne Thomas Dolan wrote:
Is it easier to check that a given function is implemented in the
current environment when the function is a high-level abstraction? Is
checking for std.putenv (a thin interface) harder than checking for
os.setenv (your abstraction)?
With my abstraction, the Lua program only has to check for the
existence of a single interface. Without the abstraction, it has to
check for N possibilities, where N is not bounded. So it seems simpler
to me, yes.
I don't see that it is, but maybe a thin interface would introduce
more checks than necessary, defeating the performance boost gained
from a simpler translation. I dunno.
Where is the performance boost? Changing a name between the Lua and the
C interface does not cost anything.
You might be thinking that my proposed __index metamethod on a global
env table is somehow slower than an explicit call. I think you'll find
that it is actually faster, although the difference is not particularly
significant.
- References:
- os.setenv()???, Chris Marrin
- Re: os.setenv()???, Luiz Henrique de Figueiredo
- Re: os.setenv()???, David Burgess
- RE: os.setenv()???, Dolan, Ryanne Thomas (UMR-Student)
- Re: os.setenv()???, David Burgess
- Re: os.setenv()???, Diego Nehab
- Re: os.setenv()???, Ryanne Thomas Dolan
- Re: os.setenv()???, David Burgess
- Re: os.setenv()???, Chris Marrin
- Re: os.setenv()???, Rici Lake
- Re: os.setenv()???, Ryanne Thomas Dolan
- Re: os.setenv()???, Rici Lake
- Re: os.setenv()???, Ryanne Thomas Dolan