News for hackers. Stuff that matters.
Re:Object-oriented techniques in C by nqzero on Tuesday September 22, 2015 @03:34PM (#10261056)
this approach is similar to the one that GObject uses, though stripped down a bit for embedded. i haven't used it in years, but it worked great with GTK+. the only downside i remember is the overhead of the virtual function calls (in contrast, the jvm is able to factor out the virtual call in many cases at runtime)

one advantage of using something like this is it forces you to really think about what makes something OO and gives you a deeper appreciation of it. i'm a java programmer now, but to this day i still prefer object oriented C to C++

There are no comments on this comment yet.