News for hackers. Stuff that matters.
Re:Rules for Developing Safety-Critical Code (2006) [pdf] by AnimalMuppet on Friday October 18, 2019 @01:29PM (#21293300)
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.)
Re:Rules for Developing Safety-Critical Code (2006) [pdf] by msla on Friday October 18, 2019 @01:55PM (#21293567)
That would defeat some static analysis, so I can see it being disallowed by a careful style guide.