|
Boost Users : |
From: Gottlob Frege (gottlobfrege_at_[hidden])
Date: 2007-02-17 23:10:36
On 2/15/07, Ion Gaztañaga <igaztanaga_at_[hidden]> wrote:
> Hello everyone,
>
> The review of the proposed Boost Bimap library written by Matias
> Capeletto starts today (February 15th, 2007) and ends after 10 days
> (February 25, 2007).
So far:
A: namespace:
---------------------
from the 'One Minute Tutorial':
That is more or less all that is needed to start using the
bidirectional map. The following two lines must also be added:
#include <boost/bimap/bimap.hpp>
using namespace bimap;
2 points:
- I prefer not to use 'using'. I know I don't have to, but I don't
like that the docs imply that I do.
more importantly:
- is it going to be in 'bimap' or in 'boost'?
B: 'relation'
----------------
I think I understand the philosophical reasoning for preferring
'left/right' over 'first/second', and thus the impetuous for creating
'relation'. However...
- I think 'relation' is too generic a word to abscond.
- how about:
- couple
- duo
- or probably just 'bipair'
- or maybe even consider that std::pair, although not perfect, might
make things easier:
- it can be used in other algorithms
- it is already well known
- the nature of typing code forces order - ie note that bimap<X, Y>
is different than bimap<Y, X> (although philosophically the same).
Even with 'left/right' you still have order - left corresponds to the
*first* type listed in the bimap, 'right' corresponds to the *second*
type passed in. Or is it bimap<Right, Left>? I don't think so.
But other than that, so far so good. Looks like something I'd use.
And the docs are snazzy.
- Tony
Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net