3 ms·
In C, you could do that with an array of pointers to functions, and just index into the array. (The functions would need to know their own number of arguments,
by AnimalMuppet 7y ago
In C, you could do that with an array of pointers to functions, and just index into the array. (The functions would need to know their own number of arguments, though, and consume them from the byte stream. But I think I prefer that to the dispatcher knowing the number of arguments that each function consumes.)
- msla 7y agoThat would defeat some static analysis, so I can see it being disallowed by a careful style guide.