You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Namespaces make weak relationships between modules. This means that for dialogue.lua to work init.lua needs to correctly place node.lua in Namespace.node which is a possible point of failure.
You may later revisit node.lua and or init.lua and then dialogue.lua would stop working because it can't find what it's searching for in Namespace.node
Directly requiring node.lua in dialogue.lua would fix this issue, since you can clearly see what file depends on what other file.
Namespaces are generally useful when you need to require tens of files in a single file, or when you have recursive dependencies. But neither is the case, Babble is pretty module and all the files require 1 other file or none at all.
The text was updated successfully, but these errors were encountered:
Namespace has been removed. Files now have to explicitly require their dependencies. Init.lua now contains a table that is filled and returned with all modules.
As discussed in Discord:
Namespaces make weak relationships between modules. This means that for
dialogue.lua
to workinit.lua
needs to correctly placenode.lua
inNamespace.node
which is a possible point of failure.You may later revisit
node.lua
and orinit.lua
and thendialogue.lua
would stop working because it can't find what it's searching for inNamespace.node
Directly requiring
node.lua
indialogue.lua
would fix this issue, since you can clearly see what file depends on what other file.Namespaces are generally useful when you need to require tens of files in a single file, or when you have recursive dependencies. But neither is the case, Babble is pretty module and all the files require 1 other file or none at all.
The text was updated successfully, but these errors were encountered: