[Feature Request] Multiple implementation of forwards #789
Labels
compiler
Problems with the compiler parsing source code.
enhancement
vm
Concerning the virtual machine.
I'll be short:
Sometimes we all use libs and sometime libs require to calling initial functions for hooking something, checking and etc
1. Simple example:
Dev of this library want to check game to prevent errors but what if dev of plugin that used this library require to use
AskPluginLoad2
too?Okay, dev of lib add function that must be called in AskPluginLoad2 by plugin but what if dev of plugin forget it?
Okay, this is not critical by what if library require detect game, as example, this may be lib for L4D1/2
2. More complex example:
Some time ago i need to rewrite very old plugin that implement bans / mutes / gags system (like SourceBans++), original plugin was very dirty, many strange names of functions, sometime params was DataPack instead 4-7 simple types (funcs were never called asynchronously) and i started write re:0
I fast seen that all of punishments require almost same funcs but different was only implement punishment func
Good idea just isolate each punishment type with all variable and funcs
I used macros-templating for this, but it's not important
Each type require to register command, connect translations and etc
Okay, i just create some functions:
You can see from the examples that if we can just implement one forward several times in the plugin, this will greatly simplify such implementations
3. So I suggest adding syntax like this:
// Just idea, not real
In low level implementation we just did this:
The text was updated successfully, but these errors were encountered: