4 ms·
C has the same abstractions and the same OOP capabilities. You just have to type more to get there. Take a look at gtk+ and its supporting libraries for examp
by taf2 11y ago
C has the same abstractions and the same OOP capabilities. You just have to type more to get there. Take a look at gtk+ and its supporting libraries for examples. The gist of the idea is a struct is the same as a class but public by default. Your this pointer, constructors and destructors must be called explicitly and error handing as well is explicit. In terms of how you can manage this among a larger team, would be to expose strict interfaces through methods that expect a struct pointer if it's an object. Next you can separate the concerns of the application in the same way you would in any OOP language. IMO this is probably a bad idea as the amount of typing necessary for a marginal performance win is probably not worth the effort. I like to think of it as a whole lot of dirt you will need to move with you fingers. Languages like golang and rust are perhaps better options to explore first?