Return Styles: Pseud0ch, Terminal, Valhalla, NES, Geocities, Blue Moon. Entire thread

Order Programming Language

Name: Anonymous 2016-01-22 14:52

C macros aren't turing complete..
https://github.com/polytypic/order-pp

Name: Anonymous 2016-01-24 5:01

>>34
OO dispatch is just selecting a function pointer at runtime(array[F](args)).
You can write a function that handles all cases of the "dispatch" using a state machine without writing redundant OOP code for every case (and they grow fast:10 args and you'll start writing factorialof(10) functions to satisfy the OOP gods).
In terms of code size and speed this is actually more efficient, as the single function doesn't duplicate any redundant structures or require special handling to call/select:
a state machine is always faster.
Of course you can just use _Generic at compile time to make a macro for this, if the "dispatch" is actually constant at the call site of the function.

Newer Posts
Don't change these.
Name: Email:
Entire Thread Thread List