That said even C has already a way too rich and complex syntax. ISO is doing planned obsolescence with its syntax instead of fixing it, and no the linux kernel is not written in C, but using a gcc-massively-extended C dialect.
Then it needs discipline: c89 with benign bits of c99/c11/etc.
A good move is to write/use a C coded game engine, I wish godot was plain and simple C.
Still... Godot makes HEAVY use of C++'s exclusive features. The GUI system relies on complex static and virtual inheritance and the scripting engine makes serious use of macros for automatic class integration. ...and that's just me scratching the surface with my limited knowledge!
As I said, game binaries should "libdl" everything, namely be pure and simple ELF64 binaries (with the least amount of relocation _types_).
Well, the gcc standard c++ library just does not allow to do that at all, period. It does not have a "libdl" mode, and even worse, it seems it has hard dependencies into glibc internals.
The only mitigation is to maximize libdl-ization of the game binaries and to use a VERY VERY old set of glibc libs (cf what godot does, at a cost of kludge), because, the libstdc++ will be bound to (symbol/version)s of this set of glibc libs.
> deep cloning of data with simple assignment a = b;
> deep equality checks bool are_equal_by_value = memcmp(a, b, sizeof(some_struct_t));
Errr, wat? We seem to have very different understandings of "deep" in this context. Neither of the above are "deep" in the sense that pointers within the struct will not be followed with their referenced data copied/compared. These are shallow operations.> C++ is the obvious choice but the syntax and endless features overwhelm me. I’m not a fan of OOP for game development - class-heavy C++ was not the right move
You can well use C++ with a very modest style, even completely without OO if needed; C++ has many advantages over C for large projects; the type system is more mature and it offers very useful features for modularization and memory management (which were already present in C++98, so it's easy to get a working compiler on virtually all platforms where there is a C compiler).
If you're going to use FOSS code for your project you should release it as such.
That said, congrats on releasing. I play around with C a lot but couldn't imagine sticking with it long enough to finish something bigger than a library.
bool are_equal = memcmp(&a, &b, sizeof(some_struct_t));
Isn't this a bug? Structs are allowed to have padding bytes between bytes occupied by fields, which will have unpredictable ("garbage") values. So a pair of structs with all fields pairwise same can have different padding bytes, so checking equality with this method will give a false negative.If you don't like C++ because of classes and clutter, would Rust be a viable alternative (asking because I have not much experience in C and in Rust, so maybe if I ever try to write a very simple game engine, I might like to try in Rust)?