Subject: [boost] [extension] library under construction status
From: Lorenzo Caminiti (lorcaminiti_at_[hidden])
Date: 2013-04-01 13:34:27
What's the status of Jeremy Pack's library under construction Boost.Extension?
P.S. I read the docs and I have a couple of comments:
1. shared_library as RAII
Why isn't shared_library an RAII object? If there's a good reason for
that, a RAII object should also be provided scoped_library that will
open at construction and automatically close at destruction.
2. get should use function type syntax
get<result_type, arg1_type, arg2_type, ...> should be changed to
get<result_type (arg1_type, arg2_type, ...)>
3. type_map purpose/name
The introduction of type_map seems arbitrary... some rationale needs
to be provided as soon as it's introduced in Tutorial 2. Is there a
better name than type_map? That name tells me little about what it
is.. maybe, factory_map given that it's a map strings to factories?
lib.call(type_map) the name call is too generic, it should be changed
to set or even better get_factories:
5. type_map doesn't allow for multiple constructors
type_map doesn't allow for derived classes to have constructors with
different signatures than the base class. It also doesn't allow for
classes (derived or base) to have multiple constructors. In any case,
the syntax should use member function types, changing the current
std::map<std::string, factory<animal, int> >...
std::map<std::string, factory<void (*::animal)(int)>
6. I didn't understand parameter_map purpose, usage, etc :(
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk