The last thing you can do is the "Builder Design Pattern". Basically the idea is to create an object (in your case, create basically a dictionary) that you can then parse to create an object.
So the way I've seen it done is basically passing a string to your mel function:
string $argsv="-testVal 4 -otherVal 30";
global proc test(string $argsv){
int $testVal = argParse($argsv, "-testVal");
}
You write the parser to basically look for the flag, match the string and then pass the resulting value and detect the type of value. You'd also write a function which would create this string more efficiently as well possibly. Then you can reuse it for every single thing you want.
Here's a little reading you can do on the subject:
http://stackoverflow.com/questions/328496/when-would-you-use-the-builder-patternBut yes, as everyone said Python would DEFINITELY make your life easier with dictionaries/better data handling. Good luck!
(Special thanks to our R&D guy for letting me know about the words "builder pattern" in order to sound smart haha.)