Boost logo

Boost :

Subject: Re: [boost] [boost::endian] Request for comments/interest
From: Tomas Puverle (tomas.puverle_at_[hidden])
Date: 2010-06-01 11:38:04


> Opacity is good when you want high level abstract behavior, but shouldn't
preclude the (potentially)
> higher efficiency low level API.

Completely agree.

I do think, however, that Terry has presented some compelling use cases and I'd
like to re-iterate that based on the feedback I've received, it seems
inevitable that I'll have to implement the higher-level "typed" interface
before I can consider submitting the library for formal review.

> Yes, but it just works inefficiently in some uses cases, unless I missed
something.

Yes - I am about to reply to one of Terry's posts where we'll discuss this
further.

> I see the value of that, but presuming that the code that reads such a
> message from the external device is encapsulated, the reading and swapping
> likely is done together once per message, so changes to endianness are
> localized without the special types. There is danger of writing code in
> which reading and swapping is not localized, so it would be appropriate to
> alter users to the value of doing so.

Thank you for so succinctly re-iterating the point that Dave Handley and I have
been trying to make. I think it is important to realize that the
"encapsulation" that you get by using the typed inteface will not be
particularly good if the types just get used throughout the application rather
than being contained in the I/O part of the code. In my view, it almost
amounts to just a false sense of security.

Tom


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk