What is the purpose of nesting modules?

I see a lot of scripts that use a module nested inside another one for the customizable portion of the script, i.e.

module AuthorName module ScriptName #code here endendand it seems to be pretty common practice, but I guess I'm just confused why that is. I suppose I can see it being useful if the script is meant to be used with other scripts where the AuthorName module is also used, but I've seen it in standalone scripts as well. Is there any particular advantage to doing that as opposed to just

module ScriptName #stuffendSorry if this is a silly question, but I'm still learning. 🙂
Just add extra name space

So it wont conflict with another scripter's script.
The script author can't dictate or predict what other scripts you are going to use alongside theirs. Using the author as a module name and then the script means if you have two scripts that use the same name, they won't get confused with each other.


Normally you wouldn't use multiple scripts that are designed to achieve the same thing, but for some reason, people do that sometimes. But there might also be similarly-named scripts that actually do different things.
What you see there is modules used to implement namespaces.

You are in principle right about the scripters name not explaining the functionality or group of functionality, but I still highly suggest following the style.

Using the scripter name as the root namespace is a compatibility measure that has become the standard practice. The risks of conflicts with different concepts of the same name are reduced significantly with the plug-n-play type of scripts shared here.

*hugs*

 - Zeriab
Do you put everything in one folder on your desktop, or do you organize it?


As a matter of courtesy, always namespace your own scripts under your alias / name, and then sub namespace them by functionality and components.
Do you put everything in one folder on your desktop
 My desktop has no icons in it... XD

Personally, I do prefer it.

module ADIK  module EXTRA  endend than doing 

Code:
module ADIK_EXTRAend

Original thread: https://forums.rpgmakerweb.com/threads/what-is-the-purpose-of-nesting-modules.36091/