|
Boost : |
From: Robert Kawulak (kawulak_at_[hidden])
Date: 2005-10-05 04:32:39
Hi everybody,
> From: Robert Kawulak
> I didn't change the name of constrained_type template to
> constrained yet,
> but if this shorter form is OK then I'll do this before next update.
I'm considering some changes in naming, in particular:
- I'd change 'constrained_type' to 'constrained',
- I wonder if I should move 'constrained' and its aliases ('boounded_int'
etc.) up form 'boost::constrained_types' namespace directly to 'boost'
namespace - these are things that are most likely to be used and maybe
'boost' is better for them (or maybe, instead of moving them, using
declarations in 'boost' will suffice),
- the bounds specifiers are in 'boost::constrained_types::bounds_specifiers'
namespace, so maybe there's no need to add '_bounds' to each name at the
end:
bounds_specifiers::integral_bounds -> bounds_specifiers::integral
bounds_specifiers::generated_bounds -> bounds_specifiers::generated
bounds_specifiers::static_bounds -> bounds_specifiers::static
- OTOH, the bounded policies' names seem to be to short and not properly
chosen, I'd change their names so they say what the policy does when an
attempt is made to assign an out-of-bounds value:
bounded_policies::error -> bounded_policies::failing
bounded_policies::wrap -> bounded_policies::wrapping
bounded_policies::clip -> bounded_policies::clipping
- maybe changing the namespaces' names from plural to singular would make
the names of policies more meaningful:
error_policies::throw_exception ->
error_policy::throw_exception
bounded_policies::error -> bounded_policy::failing
bounds_specifiers::static_bounds -> bounds_specifier::static
(Note: all the abovementioned namespaces reside in
'boost::constrained_types')
I'd appreciate any comments, especially of people experienced in the area of
naming conventions :)
Best regards,
Robert
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk