News for hackers. Stuff that matters.
Re:OOP in C by zabzonk on Sunday January 08, 2023 @06:00AM (#34298049)
please post an example of what such a callback would look like
Re:OOP in C by rramadass on Sunday January 08, 2023 @06:32AM (#34298218)
Re:OOP in C by cihangir on Sunday January 08, 2023 @07:35AM (#34298579)
Linux kernel code makes heavy use of object-oriented design patterns [0]. It's not the best of its kind, but still provides a reasonable example of how OOP can be achieved in C: https://gist.github.com/cakturk/cd75d0ca588151c86d641cb6d5a1...

[0] https://lwn.net/Articles/444910/

Re:OOP in C by rramadass on Sunday January 08, 2023 @09:59AM (#34299610)
Part 2 to the above lwn article: https://lwn.net/Articles/446317/