Y
Hacker News
new
|
ask
|
show
|
jobs
by
Animats
2382 days ago
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.
2 comments
bobdobbs666
2382 days ago
This is pretty much the standard way to write ABI compatible plugin interfaces in C that can be easily bound to multiple other languages.
link
rootlocus
2382 days ago
Just goes to show C++ failed the zero overhead principle.
link
Animats
2382 days ago
If you don't have virtual functions, a C++ object is just an struct associated with static function links.
link
cjwoodall
2379 days ago
So sad that it did...
link