Currently, if you have a proc that takes 2 arguments, and you call that proc with 3 arguments, the last argument will simply be ignored. This is not much of a problem in itself, but when you get procs with lots of arguments that are called in many places, it becomes very annoying. If you remove an argument you have to ensure that for every call to that proc, the arguments line up correctly, and there is no error to speak of to alert you if something is wrong, your code just doesn't work. This could have saved me many headaches in a recent project.
Therefore, I suggest that a warning (or a full error) is implemented that tells you when you call a proc with too many arguments.
| |||||||
Aug 29 2014, 1:34 am
|
|
This isn't feasible. Some procs, including native procs, depend on a variable number of arguments by using the "args" proc variable.
|
In response to MisterPerson
|
|
That's not a real thing that actually does anything.
|
It would just be an indicator to the compiler that many arguments are expected and that's ok
|