Could be something something simple like proc()
if (calltimer)
deltimer(calltimer)
calltimer = addtimer(src, proc(src.dostuff), 10, TIMER_NORMAL, arg1, arg2)
This is mainly for code that calls a proc dynamically using call()().
Right now for first class variables (variables that hold procs) the options are:
- Use a string (no errors on compile if the proc stops existing or if you made a typo)
- Find (and pass) the entire proc definition "/mob/living/carbon/human/proc/dostuff" (long, unwieldy, sometimes you have to work to find the proc if you know the name but not where it's defined, (ie, you have to do more work then just calling the proc normally, for no reason))
- Use : or . path operators depending on if its a overriden proc, global proc, or a proc defined at this level (doesn't work on procs on base types like atom or movable since it works on the path, not the type)
If we had something that could take a proc by name, in the same fashion that you call a proc with, (thing.proc or proc) and return a path reference to that proc, it would make doing dynamic proc calls much easier, and allow us to stay true the concept that typos in code should lead to compile errors, not runtime errors.