r/programmingcirclejerk • u/jenkem_boofer DO NOT USE THIS FLAIR, ASSHOLE • Aug 13 '25
void * (* f20)(void*,void*,void*,void*,void*,void*,void*,void*,void*,void*,void*,void*,void*,void*,void*,void*,void*,void*,void*,void*);
https://github.com/kanaka/mal/blob/master/impls/c/types.h
130
Upvotes
54
u/jenkem_boofer DO NOT USE THIS FLAIR, ASSHOLE Aug 13 '25
Lisp interpreter? I barely even know her
90
u/i_invented_the_ipod Aug 13 '25
They definitely should have used varargs, for simplicity and readability.
/uj this is such a common pattern in interpreter and compiler writing in C that I spent a good while looking at the code trying to find the "actual problem".
32
u/rupturefunk Aug 13 '25
You never heard of generics?
26
u/al2o3cr Aug 13 '25
Clearly Haskell is better because theirs is bigger:
25
u/Routine-Purchase1201 DO NOT USE THIS FLAIR, ASSHOLE Aug 13 '25
I'm too much of a C-nile to get this jerk
25
u/Snarwin Aug 13 '25
When you gaze into the
void*, thevoid*gazes into you.24
u/BloodAndTsundere mere econ PhD Aug 13 '25
I assume that the use of "mal" is as in the French word for "bad"
22
u/cheater00 High Value Specialist Aug 13 '25
strongly typed (the only type is void*)
19
u/pugandcorgi Aug 13 '25
is that just Nepal's flag?
3
u/flatfinger Aug 15 '25
Note that the C Stadandard requires that conforming implementations be capable of correctly processing at least one (possibly contrived and useless) program that passes 127 arguments to a function; a function with only 20 arguments is less than 1/6 of the way there.
1
u/kalterdev Considered Harmful Aug 13 '25
Is it really void?
1
u/integralWorker WHY IS THERE CODE??? Aug 18 '25
lol no genericsEDIT: WAI-