I'm looking for some kind of C dialect that is as minimalistic as C
but has built-in classes support. So I can (and encouraged to) use macros, pointers to arrays and manual memory management but also create classes, add fields and member functions to them etc. This question appeared when I tried to implement some kind of OOP in C
and typedef struct
and function pointers do something similar to what I want, but "member functions" require to manually pass a pointer to the object as a parameter to them, and that's not what I want to do. I know that I can just write on C++
as on "C with classes" and I would, however C++
encourages a different programming style and I'm curious if there is something that is exactly what I want.
I was searching for "C with classes" but I've only seen C++
in results, so I expect that the answer is "just use C++" and I'm OK with that, but I'm just curious.