This conversation has been going on at length in another thread:
http://www.gammon.com.au/forum/bbshowpost.php?bbsubject_id=1276&page=999999
...but since much of the conversation there is not very relevant, I am starting this new thread.
The purpose of the thread is to discuss how "Plugins" should be implemented in future versions of MUSHclient.
(continuing previous conversation):
The reason I made the distinction between default files and other "include" files, is because default files and the "core"/"mother" world files would be meshed (with the "mother" files over-riding the Default's), where as an "include"/"child" files would be completely independant of it's "mother".
Mother + Default = Default Settings/Values over-ridden
Mother + Child = Settings/Values Co-exist in different namespaces.
The advantage to keeping the "mother" and "child" worlds (namespaces) independent, is that you naturally avoid collision of names and variable or setting values.
The disadvantage, is that cross-communication between a child [sub]world and it's mother could be difficult, and may require extensive [re]programming of the client.
Suppose, for example, you keep them seperate:
You may have a script file you use for all of your worlds, that takes output created by the script for the world, and logs it when sending:
Sub LogandSend (String)
If each include file runs in it's own namespace, then a second include script would not be able to call that subroutine in the first include script.
On the other hand, if a third include script has it's own built in "LogandSend" subroutine (that could be slightly different), then you may run into a problem if the include files are NOT run in their own names space.
Similar problems arise with identical variables, or triggers, aliases, timers with identical names.
(We started calling Variables, Aliases, Triggers, Timers "VATT" for short in the other thread).
It seems the solution may be to let each run in their own space, with special formatting/arguments made to functions to allow them to cross-communicate across the multiple "namespaces".
http://www.gammon.com.au/forum/bbshowpost.php?bbsubject_id=1276&page=999999
...but since much of the conversation there is not very relevant, I am starting this new thread.
The purpose of the thread is to discuss how "Plugins" should be implemented in future versions of MUSHclient.
(continuing previous conversation):
The reason I made the distinction between default files and other "include" files, is because default files and the "core"/"mother" world files would be meshed (with the "mother" files over-riding the Default's), where as an "include"/"child" files would be completely independant of it's "mother".
Mother + Default = Default Settings/Values over-ridden
Mother + Child = Settings/Values Co-exist in different namespaces.
The advantage to keeping the "mother" and "child" worlds (namespaces) independent, is that you naturally avoid collision of names and variable or setting values.
The disadvantage, is that cross-communication between a child [sub]world and it's mother could be difficult, and may require extensive [re]programming of the client.
Suppose, for example, you keep them seperate:
You may have a script file you use for all of your worlds, that takes output created by the script for the world, and logs it when sending:
Sub LogandSend (String)
If each include file runs in it's own namespace, then a second include script would not be able to call that subroutine in the first include script.
On the other hand, if a third include script has it's own built in "LogandSend" subroutine (that could be slightly different), then you may run into a problem if the include files are NOT run in their own names space.
Similar problems arise with identical variables, or triggers, aliases, timers with identical names.
(We started calling Variables, Aliases, Triggers, Timers "VATT" for short in the other thread).
It seems the solution may be to let each run in their own space, with special formatting/arguments made to functions to allow them to cross-communicate across the multiple "namespaces".