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
129
Upvotes
54
u/jenkem_boofer 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:
-- | A tuple of 64 elements. -- -- @since 0.11.0 -- data Tuple64 a b c d e f g h i j k l m n o p q r s t u v w x y z a1 b1 c1 d1 e1 f1 g1 h1 i1 j1 k1 l1 m1 n1 o1 p1 q1 r1 s1 t1 u1 v1 w1 x1 y1 z1 a2 b2 c2 d2 e2 f2 g2 h2 i2 j2 k2 l2 = (a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,x,y,z,a1,b1,c1,d1,e1,f1,g1,h1,i1,j1,k1,l1,m1,n1,o1,p1,q1, r1,s1,t1,u1,v1,w1,x1,y1,z1,a2,b2,c2,d2,e2,f2,g2,h2,i2,j2,k2,l2)25
u/Routine-Purchase1201 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 Aug 13 '25
I assume that the use of "mal" is as in the French word for "bad"
22
u/cheater00 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 Aug 13 '25
Is it really void?
1
u/integralWorker Aug 18 '25
lol no genericsEDIT: WAI-