Re: Setting caller scope locals or upvalues
[
Date Prev][
Date Next][
Thread Prev][
Thread Next]
[
Date Index]
[
Thread Index]
- Subject: Re: Setting caller scope locals or upvalues
 
- From: Frank Mitchell <frank_mitchell_us@...>
 
- Date: 2023年2月25日 20:52:04 +0000 (UTC)
 
If I may make a suggestion: let the Lua side create locals and upvalues.
     local isdir, isfile = import('wax.fs', 'isdir', 'isfile')
That is, multiple return of named members from the module. I for one prefer local variables because you're not writing the global namespace ... and access within your module is just a little faster.
Frank Mitchell