bestelbus22@lemmy.world to Programmer Humor@lemmy.mlEnglish · 1 day agoThe meaning of thislemmy.mlimagemessage-square60fedilinkarrow-up1499arrow-down111
arrow-up1488arrow-down1imageThe meaning of thislemmy.mlbestelbus22@lemmy.world to Programmer Humor@lemmy.mlEnglish · 1 day agomessage-square60fedilink
minus-squarexiii@lemmy.worldlinkfedilinkarrow-up4·edit-26 hours agoI 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.
minus-squarebestelbus22@lemmy.worldOPlinkfedilinkarrow-up1·5 hours agoInteresting, how did they do inheritance? Something like void *super? Also why not switch to CPP if you wanna do OOP?
I was working on a C code base with classes, inheritance, and polymorphism, all done by hands and macros.
Something like
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.
Interesting, how did they do inheritance? Something like
void *super
? Also why not switch to CPP if you wanna do OOP?