Currently, when defining an extension function, we must define:
Why this would be useful:
As an example, DLLs for data structures. If the user wants to call add("blah") and add(1), then with the current system, the original programmer must have written this script for add:
if (is_real(argument0)) return add_real(argument0); else return add_string(argument0);This adds significant overhead when the DLL itself is fast. Also, the complexity of the script required increases to 2^n when n are variables able to be either string OR real. With overloading, the entire burden would be shifted onto significantly faster compiled code, and would not require the script.
Potential benefits: Massive in some cases, none in others. Potential problems: Not backwards-compatible with GM7.
I also considered requesting this for DLLs, but because those are done with what is effectively a function pointer, it would be impossible.
Edited by Gamer3D, 20 March 2011 - 07:24 AM.