|
Boost : |
Subject: Re: [boost] [endian] [bikeshed] Conversion function naming discussion
From: Beman Dawes (bdawes_at_[hidden])
Date: 2015-01-25 10:34:00
On Sun, Jan 25, 2015 at 9:32 AM, Peter Dimov <lists_at_[hidden]> wrote:
> Beman Dawes wrote:
>>
>> The current names I'm least comfortable with are the conversion function
>> names in the endian sub-namespace:
>>
>> big_to_native
>> big_to_native_inplace
>> native_to_big
>> native_to_big_inplace
>> little_to_native
>> little_to_native_inplace
>> native_to_little
>> native_to_little_inplace
>> conditional_reverse
>> conditional_reverse_inplace
>>
>> These are quite explicit, but are a bit too long and awkward for my taste.
>> I'd be willing to change these names if someone can come up with
>> replacements that are shorter and less awkward, but still reasonable
>> explicit.
>
>
> You can consider 'native' to be implicit and use
>
> from_big
> from_big_inplace
> to_big
> to_big_inplace
> from_little
> from_little_inplace
> to_little
> to_little_inplace
>
> although I, personally, am not sure whether this is an improvement.
Those are a nice set of alternatives, but like you I'm not sure if
they are an improvement. Let's see what others think.
Thanks,
--Beman
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk