Report Offensive Message

Object Oriented C
You made quite a few interesting points there.

With regard to the idea of implementing an object system in C, what you described in C + C++ is kinda the opposite of what I was talking about when I mentioned such an object system could be implemented in C. The book, as you described it, apparently shows how some subset of the C++ object system could be implemented in C, then shows how C++ provides it for you in a manner easier to use to probably superior effect. My comments were meant, rather, to suggest there might be a completely different object system lurking in C, struggling to get out, when you need it. My mention of Perl was meant to highlight this to some extent, because implementing an object system in Perl using lexical closures would yield something significantly different from the class-based default object system of Perl (I'm speaking of Perl 5 here, in case that's not obvious). Similarly, Io's object system doesn't have classes; it is object oriented, but not in a manner in any way similar to the object system of Ruby, which in turn is not much like C++ even though both Ruby and C++ use a class-based object system. The kind of object system I'm beginning to detect lurking in C is much simpler than that of C++, and it would basically be a wholly different object orientation paradigm from that used by C++, I think.

Of course, I'm speculating a lot here. I haven't actually explored this idea much, yet.
Posted by apotheon
22nd May