|
Boost : |
From: Jeff Flinn (TriumphSprint2000_at_[hidden])
Date: 2006-05-31 14:22:24
Rene Rivera wrote:
> Beman Dawes wrote:
>> "me22" <me22.ca_at_[hidden]> wrote in message
>> news:fa28b9250605310817l2d71b783j9e92bd247619d313_at_mail.gmail.com...
>>> On 5/31/06, Beman Dawes <bdawes_at_[hidden]> 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.
>
> Since name suggestions are up... My main problem with the bin*, bun*
> names is that you have to train yourself to know what they mean. It
> might be easy after a while but they don't say anything to me
> initially (even with the explanatory chart). My suggestion would be
> to stick close to the existing cstdint types:
>
> int_be8_t
> int_le8_t
> uint_be8_t
> uint_le8_t
>
> etc.
>
> Of course that means using bit sizes instead of byte sizes. But I find
> the bit sizes more natural anyway :-)
This convention occured to me as well, as I was reading through the thread.
Needless to say I like this naming convention, add another vote.
Jeff Flinn
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk