|
Boost : |
From: Benaka Moorthi (chrono232_at_[hidden])
Date: 2006-05-31 14:41:54
Beman Dawes wrote:
I think the names for the types might be a little bit too cute. "bin"
makes me think binary, not signed big-endian. That being said, I'm
not sure I have any good name that isn't far too verbose.
unsigned_littleendian_aligned<4> is admittedly starting to push
convenience, though bigendian<5> isn't too bad.
I'm often amazed at the clever names Boosters suggest, so I think it is worthwhile to speculate a bit about better names. But the everyday use typedefs really do need to be short and memorable. I've been using the "bin2", "bun3", etc. since 1984 or so, with several hundred programmers now using them all the time, and never had a request to change the names.
How about using namespaces:
namespace endian
{
namespace big
{
typedef ... unum1;
typedef ... snum1;
...
}
namespace little
{
typedef ... unum1;
typedef ... snum1;
...
}
typedef big::unum1 bun1;
typedef big::snum1 bin1;
...
}
-- http://www.fastmail.fm - Does exactly what it says on the tin
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk