[Date Prev][Date Next][Thread Prev][Thread Next]
- Subject: Re: multiple global contexts
- From: "Dylan Cuthbert" <dylan@...>
- Date: Wed, 25 Jun 2003 10:53:37 +0900
<RLake@oxfam.org.pe> wrote in message
> > Unfortunately though, I need to create access to all libraries again in
> > global space don't I? or at least the libraries I want the user to be
> > to access.
> Yep, but I think that is a strength.
Come to think of it, I think that's good too - I can prevent people having
access to those nasty looking "raw" functions too. ;-)
> > What's the overhead for that kind of "setting up" of a variable list?
> > the objects already exist elsewhere in the system I presume its not that
> > costly)
> Depends how you do it. My fave is memoising lazy copy, but it may be
Ok, it took me a few seconds to work out what that inject_math = inject
"math" stuff was doing but I've got it now, the stack gets inject, "math",
sandbox then the inject( "math" ) resolves to the function that takes
sandbox as its argument.
A Lua question, why isn't the syntax inject( "math" )( sandbox )... why is
it inject "math"( sandbox )?