Name: Anonymous 2015-11-16 6:31
when C has function pointers?
a function can't return a pointer to a function of the same typeWho cares, nerd?
struct func { struct func *(*func)(void); };
They also suck for performance because they're huge (who needs a value that can cover the full address space - almost nobody; you're just wasting precious cache) and make branch prediction harder than it needs to be (shared code that dererferences externally furnished function pointers can land nearly anywhere, every time).Use a better compiler nerd, rofl.
there's no way to define a self referential type in CThat's the old ``worse is better'' in action. Would this slow down the generated code in any way? No, it would probably allow for more optimizations of and across function calls. So why did they do it? Because doing it the right way didn't matter for C's original purpose, which was hacking together an OS for the PDP-11.
struct func { struct func *(*func)(void); };
Use a better compiler nerd, rofl.
C, Java, and JavaScriptAccurate.
C […]: ``All my language has is floating point numbers. Integers are just a special case of floats.''What the fuck.
``There are integer and floating point types, with floating polymorphism. They mostly look the same, but if you use a float anywhere, the whole expression has a float type.''