News for hackers. Stuff that matters.
Re:OMG: Our Machinery Guidebook by Animats on Thursday December 12, 2019 @01:35AM (#21769751)
Objects as structs with function pointers? 1990 is calling. I'm not a huge C++ fan, but trying to emulate C++ concepts in C is kind of lame at this late date.
Re:OMG: Our Machinery Guidebook by bobdobbs666 on Thursday December 12, 2019 @06:26AM (#21770979)
This is pretty much the standard way to write ABI compatible plugin interfaces in C that can be easily bound to multiple other languages.
Re:OMG: Our Machinery Guidebook by rootlocus on Thursday December 12, 2019 @02:35AM (#21770005)
Just goes to show C++ failed the zero overhead principle.
Re:OMG: Our Machinery Guidebook by Animats on Thursday December 12, 2019 @02:38AM (#21770022)
If you don't have virtual functions, a C++ object is just an struct associated with static function links.
Re:OMG: Our Machinery Guidebook by cjwoodall on Sunday December 15, 2019 @08:40AM (#21796146)
So sad that it did...