Liste des Groupes | Revenir à cl c |
There is often confusion between abstraction and the syntax used to achieve abstraction. Since there isn't a specific term for this, I'll refer to it as "syntax for abstraction."The distinction is that with abstraction you have not much code but
In C, we have everything we need: "data" and "functions."In C you have five to ten times the code and mostly boilerplat-code
For example, we can create an abstraction for a Matrix. Ultimately, the Matrix abstraction is represented by struct and the operations on it are functions:In C++23 you can have a matrix class and a multidimensional array
struct matrix a = {};
struct matrix b = {};
...
struct matrix c = matrix_mult(&a, &b);
Les messages affichés proviennent d'usenet.