this post was submitted on 30 Jan 2025
309 points (97.5% liked)
Programmer Humor
20265 readers
1429 users here now
Welcome to Programmer Humor!
This is a place where you can post jokes, memes, humor, etc. related to programming!
For sharing awful code theres also Programming Horror.
Rules
- Keep content in english
- No advertisements
- Posts must be related to programming or programmer topics
founded 2 years ago
MODERATORS
you are viewing a single comment's thread
view the rest of the comments
view the rest of the comments
So, using
void *
for everything?I worked as a subcontractor with a lead architect that used casting to void * as an only method of sending data. Argument to a function? Void *. Return value? Void *. Multithread pipe? Cast to a void *, no big deal. 80% of my job was investigating segfaults. 20% was heavy drinking to prevent suicidal thoughts.
I do mainly C and C++ and for a while, I had to check out some JS code...
I wouldn't want to take your place.
The only case I remember using a
void*
in is when passing a function as an argument for a callback, to an RTC peripheral. Even then, the function was returning avoid
.