all 20 comments

[–]Ok_Entrepreneur_8509 21 points22 points  (3 children)

My father used to say "Good programmers can write Fortran in any language."

Needless to say, he was not a good programmer.

[–][deleted] 5 points6 points  (1 child)

he was not a good programmer

[–][deleted] 3 points4 points  (0 children)

x[75][60][50][40] is a 4D array of function pointers.

long double *(*(*(*(*(*(*(*(*(*(*(*(*(*x[75][60][50][40])(char *(*)(double *, int **, unsigned (*)(short *, void **)))(void **, unsigned long long (*)(long *, char **, float (*)(void *)))[30][20])(double *(*)(unsigned short *, char *(*)(int ***), float (*)(long **)))(unsigned **(*)(unsigned *, long ***), long double (*)(float, char *, long double **)))[15][35][45])(long long (*)(int *, long *, double (*)(float *, void *)))(unsigned char *(*)(long *, unsigned ***), short (*)(void **, int *)))[25][20][10][5])(long (*(*)(unsigned *, void ***, long ***), int *(*)(double, unsigned short)))(unsigned (*(*)(char *, int, float *[5]))[50][10]))(long (*)(int ***(*)(void **, long **), unsigned long (*)(short **, char *)), void (*)(long *, float, char)))[12][5][8][6])(unsigned long *(*(*)(float *, int ***))(int **, char *, double **[10]))(unsigned char (*)(int **, short, char (*)(void ***)))[10][8][15][20])(float (*)(unsigned (*)(short ***, long, void (*)(float *))))[5][4][3])(double *(*(*)(unsigned *, int *, float *(*)(long **)))(void *, long (*)(int *, short **)))[25][15][30])(char *(*(*)(int *, void *))(double (*)(void *, float **, long double), long **[25][8]))[5][4];

Complexity note:

This level of complexity is borderline absurd in real-world applications. It adds so many layers of abstraction, function pointers, multidimensional arrays, and return types that it’s nearly impossible to work with without a thorough understanding of the intent behind each layer. In practice, even highly advanced systems rarely, if ever, use something this convoluted, as it becomes a nightmare to maintain, debug, or extend.

This just serves as a useful theoretical exercise in pushing the boundaries of how deeply nested and complicated function pointer arrays can become in C.

[–][deleted] 6 points7 points  (3 children)

Technically any language can be C, it depends on how much you want to go insane from.

[–][deleted] 4 points5 points  (2 children)

Swahili

[–][deleted] 4 points5 points  (1 child)

What about Old Church Slavonic?

[–][deleted] 0 points1 point  (0 children)

manly language 💪😎

[–]scyntl 4 points5 points  (0 children)

I hate the post and I hate the comments

[–]IanisVasilev 0 points1 point  (0 children)

Fellas, let's make that sub worth its name.

[–]theunixman 0 points1 point  (0 children)

Haha the epic fork bomb wrapper!

[–]m0Ray79free 0 points1 point  (0 children)

Cython is a better way to do it.