Boost logo

Boost :

From: David A. Greene (greened_at_[hidden])
Date: 2001-12-07 13:26:17


Vladimir Prus wrote:

>>Absolutely! As I mentioned earlier on in this thread,

>>I have found this sort of thing incredibly useful. It's

>>great for passing arguments to plugins, for example.

> To tell the truth, I find passing arguments to plugins

> relatively rare case.

I can think of all sorts of applications that might want
this. Multi-format media encoders/decoders,
compressors/decompressors, basically anything with a
filter interface. Filters are pretty common beasts.
We use plugins in our research compiler to implement
analysis and transformation passes. Passing
configuration arguments to the plugins is critical for
us, and we don't want to clutter main() with information
about all of the modules. Modules should take care of
themselves.

> This is the first case I hear about allowed arguments

> being dynamically computed, as you tell in another

> message. Do you think it worth supporting in a general

> purpose library?

It's worth it for our group. :) As for the rest of
the community, I don't feel comfortable speaking for
others. Let's solicit some opinions.

I'll say this: if an argument parser is going to
provide support for nested arguments, then it might
as well provide support for dynamically adding them
at run-time, because it is trivial to do so.

                               -Dave

-- 
"Some little people have music in them, but Fats, he was all music,
  and you know how big he was."  --  James P. Johnson

Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk