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

Who needs functional programming...

Name: Anonymous 2015-07-27 20:45

... when C has function pointers?

Name: Anonymous 2015-07-28 7:15

>>1
C function pointers are hobbled by the language's feeble type system. You can't define a function in C which returns a pointer to another function of the same type. Thus you can't even implement a simple state machine without stupid hacks to escape the type system (adding some sort of lookup table or switch statement to translate state codes to functions is the usual workaround).

C doesn't even have a generic function pointer type on all implementations (all the world is not POSIX, where void * will work fine).

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