Are there any negative side effects to setting hooks this way?
#11
And that is when code becomes completely unintelligible at the first glimpse. At least put a comment in there to load all hooks inside that hook table.


Apart from that, don't we have that feature that one plugin can unload and reload other plugins?

Isn't that problematic too with putting code outside initialize?
Reply
Thanks given by:
#12
The plugin unloading / reloading shouldn't be affected by this, it's just a style of coding; unloading and reloading work on the entire Lua states, so anything in them gets destroyed and re-created.

As for the style itself, it brings one more level of indent into the whole functions, and most IDEs aren't too helpful when using functions inside tables, as opposed to regular functions. So I'd advise against it.
Reply
Thanks given by:




Users browsing this thread: 1 Guest(s)