[RESOLVED] WinForms code generation
There are a few things that I don't like about the code that is generated for WinForms:
a) Each member is preceded by the access specifier, instead I would like to have blocks.
b) In InitializeComponent is a this-> in front of all calls/assignments, if the this-> is beeing removed the code still compiles but the designer doesn't work any longer.
c) All code is beeing generated in the header, I only would like to have the declarations in the header.
d) Several System namespaces are already visible (using namespace System::*), so what is the point of having System::Windows::Forms:: in front of all member declarations?
e) System::Void can be substituted with void, which is more natural.
I would like to have clean, human readable code.
Re: WinForms code generation
Totally agree with you on all points. You actually captured them all pretty nicely :)
The problem we have is that this code is both generated and later parsed by the CodeDOM parser which is a very primitive code parser / generator. Revamping that parser is quite an undertaking. Part of the large architectural changes we're currently planning (which were mentioned in other posts) will eventually phase out these very rudimentary parsers.
The bottom line is, you will not see this get better in Orcas; but we're working on the root cause of the problem.
Lead Program Manager
Microsoft Visual C++