Board Thread:Lua Help/@comment-24473195-20140814161206/@comment-4522253-20140814193502

No, it's not like it's run in a centralized virtual machine. They're more of a get-in, get-out situation. They're templates, after all. A central repository isn't always a great plan; modular is a bit better, even when you have Modules calling other modules.

Here's a good example: You have a Module:List that has functions to turn items into a . You want to call it from Module:Infobox or Module:Navbox, along with Module:Category_handler. Each of those can be compiled with a single #invoke, assuming they are written with the appropriate requires and functions set up. The #invoke should be in a Template: article, where it gets cached. Calling all of those dynamically would be expensive. Cramming them into a single Module would be messy. But if you're invoking all of those separately and expecting persistent shared data, that's probably not a mindset that's a good fit for Lua. It definitely isn't if you're chaining traditional Templates. Instead, that's what the requires are for. Does that make any sense?