I find that I have been doing more C / C ++ code against Win32 recently, and based on the C # background, I developed an obsession with "clean code" that is fully consistent, so move away from the beautiful System space. * returning to mishmash from the #defines that make up the Win32 API header files has a small effect on culture.
After reading the MSDN in the alphabetical list of the main Win32 functions, I realized how simple the Win32 API design really is, and this, unfortunately, has been shrouded in all the torsion from the past 25 years, including many links to 16-bit programming that are completely irrelevant in today's 64 bit world.
I should start a new C / C ++ project soon, and I was thinking about how I can recreate Win32 headers as needed. I could design it as beautiful, and yet it would maintain 100% binary (and source) compatibility with existing programs (because #defines ultimately allows the same thing).
I was wondering if anyone tried to do this in the past (Google didnโt show anything), or if someone wanted to dissuade me from him.
Another thing I was thinking about was how, with the help of a cleaner C Win32 API, it becomes possible to develop a cleaner and more user-friendly C ++ Win32 API shell, since there would be no pollution of the namespace from the old Win32 C elements.
EDIT:
To clarify, I do not do this to improve compilation performance or for any optimization, I fully understand that the compiler eliminates everything that is not used. My quest here is to have a Win32 header library that is nice to work with (because I wonโt have to block the caps-lock every time I use the function).
Dai
source share