this post was submitted on 08 Jun 2025
497 points (97.7% liked)

Programmer Humor

36323 readers
305 users here now

Post funny things about programming here! (Or just rant about your favourite programming language.)

Rules:

founded 5 years ago
MODERATORS
you are viewing a single comment's thread
view the rest of the comments
[–] xiii@lemmy.world 6 points 18 hours ago* (last edited 18 hours ago) (1 children)

I was working on a C code base with classes, inheritance, and polymorphism, all done by hands and macros.

Something like

typedef struct s_some_class {
    void (*method)(this *s_some_class);
} t_some_class;

Overall, learning C was the best enabler in my whole career. For instance I was learning Python by tinkering with CPython VM, so when I see these ‘WAT’ quircks I know exactly what’s up.

[–] bestelbus22@lemmy.world 2 points 17 hours ago

Interesting, how did they do inheritance? Something like void *super? Also why not switch to CPP if you wanna do OOP?