08-31-2020, 06:50 AM
A big thing to understand for more advanced programming is some of the structural approaches developers have come up with over the years. Basic programming just follows the order of execution in one long line. But this gets excessively long and can lead to spaghetti logic, so different alternatives were invented to allow for different ways of handling code.
Object orientation was one of the first major shifts that shook things up. And an OOP approach to programming allowed for new structural paradigms that became the foundation for a lot of modern structural design.
However, a lot of older, and especially C-focused libraries still adhere to original procedural design. You see this in SDL, in OpenGL, and also in Tilengine. This is partially just because they were originally written in C, and C was never designed to have OOP tools. It eventually got structures, but these were really just the precursors to objects. Thanks to this, most older procedural libraries focus more on functions than on objects.
The disadvantage to this is that it is an older and less user-friendly way of handling bundling code. The advantage to this, and a big part of why it hasn't gone away, is that it DOESN'T IMPOSE a programming methodology on the developer. C functions are so basic and so easy to re-use, that they can be incorporated into almost any project without requiring a particular approach. It is up to the developer how to handle their integration. That means less guidance and less hand-holding, but it also means WAY more flexibility. And it definitely means way better cross-platform support and compatibility. In some of the testing I've done over the past year, I've managed to compile SDL and Tilengine on numerous platforms. The cross-platform support of this older approach is real.
Object orientation was one of the first major shifts that shook things up. And an OOP approach to programming allowed for new structural paradigms that became the foundation for a lot of modern structural design.
However, a lot of older, and especially C-focused libraries still adhere to original procedural design. You see this in SDL, in OpenGL, and also in Tilengine. This is partially just because they were originally written in C, and C was never designed to have OOP tools. It eventually got structures, but these were really just the precursors to objects. Thanks to this, most older procedural libraries focus more on functions than on objects.
The disadvantage to this is that it is an older and less user-friendly way of handling bundling code. The advantage to this, and a big part of why it hasn't gone away, is that it DOESN'T IMPOSE a programming methodology on the developer. C functions are so basic and so easy to re-use, that they can be incorporated into almost any project without requiring a particular approach. It is up to the developer how to handle their integration. That means less guidance and less hand-holding, but it also means WAY more flexibility. And it definitely means way better cross-platform support and compatibility. In some of the testing I've done over the past year, I've managed to compile SDL and Tilengine on numerous platforms. The cross-platform support of this older approach is real.