Skip to content

nathancharlesjones/Comparison-of-OOP-techniques-in-C

Repository files navigation

Comparison of OOP techniques in C

Run on Repl.it

Watch me present on this topic at the 2023 Embedded Online Conference here.

A collection of ways to use OOP techniques in C, organized around the four principles of object-oriented programming: encapsulation, abstraction, polymorphism, and inheritance. Each project demonstrates and briefly describes a different technique which (mostly) build upon one another.

The complexity starts to skyrocket after Project 3c, so that's probably the last one I would consider using in any of my projects (if I have to debug something, I want it to be the thing I'm trying to build, not the framework I'm relying on to work). The later projects get more complete and more thorough (with Axel Schreiner's implementation being practically a version of C++ written completely in C), but given their complexity I feel like they're solidly in the camp of "For the love of God, just use use C++ already". This limits any of my OOP-style programming to just abstract data types (as opposed to a full inheritance structure), but so far I haven't found a strong need for the latter. In fact, we only need the projects leading up to and including 3c to demonstrate three different design patterns (Mediator, Template Method, and Factory) and, if I'm not mistaken, none of the techniques in "Design Patterns for Embedded Systems in C" require anything more complicated than the very first project (1a).

References

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published