Boost logo

Boost :

Subject: Re: [boost] [announce] mirror-lib 0.5.2 released
From: Matus Chochlik (chochlik_at_[hidden])
Date: 2011-01-14 10:46:44

>> There is also a Git Repository here:
>> git clone
>> git://
> I see this. Thanks ! It will be a good excuse for me to learn git.

Once you have cloned the repository with the command
above you basically need just 'git pull' to fetch and
merge any new changes.
But having said that, I don't want to discourage
you from learning other Git commands ;)

>> Well one reason is that I want the compile-time
>> and the run-time interface to be consistent with
>> each other.
> Sometimes consistency is a false goal when it serves no practical use. There
> is also a very famous quote about consistency by the writer Ralph Waldo
> Emerson which you can look up if you like.

Thanks :)

>> But besides that i think, that it might
>> be useful to have the ability to iterate through
>> meta-objects reflecting the individual template
>> parameters at run time, examine them, create
>> instances, etc.
> Instantiating templates at run-time to create types appears very daunting to
> me since this is what a compiler does at compile-time.

One of the apps where this may be of use I can think of
would be a C++ code-generator tool that would take
the meta-data for an existing code and generate some
other C++ code (like an IDL generator for example)

>> But I don't claim to have any groundbreaking
>> application for that. Currently the whole run-time
>> layer is still very experimental.

> I would suggest that you leave out run-time reflection of templates as
> having no real use, since run-time code deals with types and objects and
> templates are neither ( they are compile-time type factories so to speak ).

The Lagoon layer is highly configurable at compile time
and you can leave out many things that you don't want
in the interface in a particular app, by setting a PP symbol
to 0 or 1. I will probably add such pre-processor option for
including/leaving-out meta-templates.

> The rest of your library is very interesting. I still believe, although it
> is a huge undertaking as you have probably experienced, that C++ run-time
> reflection can be a valuable resource, especially in the area of creating a
> RAD development environment. So I applaud your effort. For RAD programming
> Borland showed this could be done with C++ Builder and Microsoft improved
> upon it with C++/CLI, but both needed language changes/additions and neither
> was pure C++ standard.

Thanks for your words :-) Actually playing with
Borland C++ Builder's MetaClass-es a few years ago
was what got me interested in reflective programming,
but having written my first run-time reflection library
I soon found out that Run-time facilities are very
inefficient for things like RPC / parameter marshalling /
serialization when you have to handle large (several
hundred thousands) sets of instances.

that and Alexandrescu + Boost.{MPL,Fusion,et co} is
where Mirror came from :)


Boost list run by bdawes at, gregod at, cpdaniel at, john at