@vaporeon_ *gives you
and Vaporeon treats*
@aescling By the way, aren't you a programmer? Please review my little C program: https://glaceon.social/@vaporeon_/116618292096617956
@vaporeon_ i don’t have any experience writing quines so i don’t really have much to say besides “nice, that’s sick”
@vaporeon_ potentially fun question: why did i have to use a void pointer fur the type of the furst argument to fac?
@vaporeon_ yeah the purroblem is that the function takes an argument that is of the same type as the function itself. if it were pawsible to (safely) type it it would be a recursive type!
@aescling Are there any programming languages that are capable of such recursive types? What about Haskell?
@aescling I admit that I had to try it out to see what's wrong, but it's a similar infinite recursion happening! If I declare it as:
Then the compiler will be unhappy, because
&facwill be of the type of pointer to anint fac(int (*f)(void*,int), int n)(don't want to type the resulting type out, that's what the compiler is for) instead of being a pointer to anint (*f)(void*,int)!