/proc/EntryPoint(...) // Trying to use named arguments with this will runtime
for(var/thing in somelist)
// Even if it didn't runtime above, args doesn't contain var names
call(thing, somelist[thing])(arglist(args))
The proc called by EntryPoint can't receive named arguments because of a couple issues. Keyword arguments you attempt to use with EntryPoint() will runtime as a bad argument because there is no argument to match the name and even if EntryPoint() had the same argument names the args list doesn't contain var names.
My request then has a couple parts:
Allow named arguments for procs that use "..."
Add a new list similar to args called kwargs that uses key value pairs when it possibly can so you can include the given arg names when you use "..." or the regular var names otherwise.
For bonus points it would be *very* nice if named arguments used with arglist() were ignored if the proc doesn't have an argument named the same. This would allow for some much cleaner code in some places.
The above example after these changes would just be
/proc/EntryPoint(...)
for(var/thing in somelist)
call(thing, somelist[thing])(arglist(kwargs))
The workaround I'm forced to use to do this otherwise looks like this
// This is just a define so we can pretend we're making a normal proc call
#define EntryPoint(arguments...) _EntryPoint(list(arguments))
/proc/_EntryPoint(list/arguments)
for(var/thing in somelist)
call(thing, somelist[thing])(arglist(arguments))