News for hackers. Stuff that matters.
Re:OOP in C by throw_m239339 on Sunday January 08, 2023 @06:39AM (#34298258)
> You don't need macros. You either call via the vtable, or you write a wrapper per interface per message.

I know, thus the /s for sarcasms.

> Such wrappers are fairly trivial to generate if you don't want to handwrite them.

It's fairly irrelevant to my point, which is that C structs aren't equivalent to Java classes in anyway.

Of course you can implement OO is C, I've done enough GObject in my life to know how horrible it is to use in practice.

Re:OOP in C by vidarh on Sunday January 08, 2023 @06:46AM (#34298299)
They only way they aren't is that the class pointer is hidden from the user.