I'm learning C++/OpenGL (previously have used Js/WebGL for several years & C#/.NET experience).
Why most of C++ projects & libraries are so ugly?
For example, I can't tell such about JavaScript projects, most of them are maybe not ugly, but just don't have: unit/integration tests, code-contracts, DI/IoC/patterns, use of Continuous Integration server.
Really, to be honest about C#/.NET projects are done more perfectly. Most of them do have the options above...
And I'm really become very angry when I see in C++ project (NOT! pure C project) something like this:
#define OPENGL_GET_PROC(p,n)
n = (p)wglGetProcAddress(#n);
if (NULL == n)
{
LOG_ERROR("Loading extension '%s' fail (%d)n", #n, GetLastError());
return false;
}
C#-developers, what do you think about such code? Do you like it?
It was taken from some OpenGL open source project, which has a very high rate and I can admit and highlight many such stuff from the different popular C++ projects...
So, my question is Why??? Why are so many bad source code in C++ projects? If to take OpenGL graphics, it's horrible... No RAII, no smart pointers, no patterns, no CI support, tests...
It's really hard to understand. C++ requires a good knowledge, but C#/.NET projects are done more conceptually, much of them are done with TDD and other stuff, which I have mentioned above...
Aucun commentaire:
Enregistrer un commentaire