@iron_bug @bonifartius > C is clear
http://www.literateprogramming.com/ctraps.pdf> I once talked to someone who was writing a C program that was going to run stand-alone in a small microprocessor. When this machine was switched on, the hardware would call the subroutine whose address was stored in location 0. In order to simulate turning power on, we had to devise a C statement that would call this subroutine explicitly. After some thought, we came up with the following:
> (*(void(*)())0)();
OK maybe that's an extreme example, here's a very simple one:
int *foo[10];
Is that a pointer to an int-array of size 10, or a size 10 array of int pointers? And I'm not even mentioning the weirdness that "int" appears at the start even though it's the innermost type.
> C is robust
What is your definition of robust? C is neither type-safe nor memory-safe. There are countless instances of "undefined behavior" in the language, which are often exploitable for things like remote code execution.
> C is perfect
Come on, man.