Re: c++ reflection (was (no subject))
Jon Watte <[email protected]> Thu, 17 Jun 2010 13:56:26 -0700
| Newsgroups | gmane.games.devel.sweng |
|---|---|
| Message-ID | <[email protected]> |
> > Have you thought about declaring your reflectable structures outside of > c++, then letting your build process create the c++ structure for you as > well as any meta-information you like to have in the runtime ? I think I explicitly said "without code generation" somewhere above in this thread. I've used extensive IDL and other code generation systems. They have their strengths, but also their weaknesses, which have been pretty exhaustively listed elsewhere. The problem I'm kvetching about here is that the compiler really has all the information needed -- it HAS to have it -- but the language and runtime exposes no way to get at that information, which unnecessarily hamstrings the set of solutions possible while staying within the language. Staying within the language is a good idea, because it makes everything from dependency checking to source-level debugging easier. Ever tried to debug from your source code into the IDL-generated code, only to realize that the bug might be in the IDL generator itself, and you can't really "step into" or "set breakpoint" in that? That's one of the problems of pre-generation. Sincerely, jw -- Americans might object: there is no way we would sacrifice our living standards for the benefit of people in the rest of the world. Nevertheless, whether we get there willingly or not, we shall soon have lower consumption rates, because our present rates are unsustainable. On Thu, Jun 17, 2010 at 12:52 AM, Richard <[email protected]> wrote: > > In article <[email protected]>, > Peter Thierolf <[email protected]> writes: > > > Have you thought about declaring your reflectable structures outside of > > c++, then letting your build process create the c++ structure for you as > > well as any meta-information you like to have in the runtime ? > > This is essentially what Qt does for its signal/slot metadata. > -- > "The Direct3D Graphics Pipeline" -- DirectX 9 draft available for download > <http://legalizeadulthood.wordpress.com/the-direct3d-graphics-pipeline/> > > Legalize Adulthood! <http://legalizeadulthood.wordpress.com> > _______________________________________________ > Sweng-Gamedev mailing list > [email protected] > http://lists.midnightryder.com/listinfo.cgi/sweng-gamedev-midnightryder.com > _______________________________________________ Sweng-Gamedev mailing list [email protected] http://lists.midnightryder.com/listinfo.cgi/sweng-gamedev-midnightryder.com