[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: Re[2]: Is there a kernel patch for creating local variables programmatically?
- From: Andres Perera <andres.p@...>
- Date: Thu, 23 May 2013 12:23:02 -0430
On Thu, May 23, 2013 at 11:57 AM, Thomas Jericke <tjericke@indel.ch> wrote:
>> >>
>> >> So far these concerns don't really align with the unconditional usage
>> >> of modules; dynamism is being preferred where it isn't beneficial.
>> >
>> > I am not sure what your point is. Could you please elaborate?
>>
>> This is unconditional:
>>
>> local t = require("foo")
>>
>> This isn't:
>>
>> if lua_version > 5100 then
>> local t = require("foo")
>> else
>> local t = require("bar")
>> end
>
> I got this part, but not your last sentence.
>
>>
>> With import semantics, the bytecode would be larger as it compiles both modules.
>
>
> Hopefully not, the bytecode of modules should still be shared and only compiled once, no need to compile imported modules in each Lua file compilation.
Once per module.
In the example, two distinct modules are beind require()'d.
The cacheing optimization pertaining to multiple inclusions of a given
module is a completely different subject that my example does not
cover...