Re: [dev] Object-Oriented C for interface safety?

From: Louis Santillan <>
Date: Wed, 26 Nov 2014 14:07:22 -0800

Personally, I feel like the public/private/protected/friend (data &
code hiding) tenet of OOP is the least beneficial. I get that it
helps make the interface contracts stronger, but that's only a concern
for me in languages that don't have strong or static typing. Simple
Inheritance (object extension), Encapsulation (grouped data and
related code), and Polymorphism (shared interfaces) are much more
beneficial. A better treatment for OOP in C, IMO, is "Object-Oriented
Programming With ANSI-C" [0][1].


On Wed, Nov 26, 2014 at 1:38 PM, Charles Thorley <> wrote:
> I understand that there is zero love for object-oriented programming
> methodologies on this list, and I am not particularly interested in this
> strategy myself, although some languages that I like (i.e. Python) make
> it hard to avoid in many ways. Regardless, this question is not meant
> to poll suckless devs on their feelings surrounding baroque,
> masturbatory abstraction; I know the answer to that question.
> I am attempting to learn C, and in my interweb travels I have
> encountered Object Oriented C. One particular theme surrounding this
> approach, which I found quite interesting, was the idea of creating safe
> and robust interfaces through (relatively?) simple means; namely,
> modeling the public/private metaphor in OOP by placing
> differently-privileged code in separate files, and managing access
> through header files. A link that describes this technique:
> I know just enough about programming to be intrigued by the idea, but
> not nearly enough to understand its implications in practice. My
> questions are:
> 1. Is this practice (potentially) suckless?
> 2. If so, under what conditions would this be a suckless strategy?
> My apologies if this has been covered previously; googling the list did
> not suggest that this is the case, although my attempts to learn C have
> revealed that my google-fu has a giant blind spot when it comes to
> producing useful results for single-character keywords.
Received on Wed Nov 26 2014 - 23:07:22 CET

This archive was generated by hypermail 2.3.0 : Wed Nov 26 2014 - 23:12:08 CET