Boost logo

Boost :

From: Domen Vrankar (domen.vrankar_at_[hidden])
Date: 2020-03-10 16:44:34


On Tue, Mar 10, 2020, 4:51 PM Phil Endecott via Boost <boost_at_[hidden]>
wrote:

> Janson R. wrote:
> > All of this C++20 mindset made me wonder if a codec API could be almost
> > as simple and elegant as making it into a range adaptor (requiring
> > memory contiguity of course); what do you and possibly other readers
> > think of that?
>
> I suspect that for things like streaming compression and encryption
> APIs, in a couple of years we'll all agree that the right way to
> do them will be as co-routines.
>

co-routines only add overhead in cases that are processing intensive and
run on the local CPU. they are meant for tasks where you wait for the
result and CPU can use that thread for something else in the meantime.

(Personally, nearly all of my recent use of these things has been
> for relatively small data; a simple non-streaming API i.e. take a
> span<byte> and return a vector<byte> would be perfect.)
>

I agree that it would be a nice first step but as I said if this project
continues I'd still prefer a stream/iterator supporting api (my general use
case) in addition to this. Perhaps I'll write an api when I get home
instead of just words...

Regards,
Domen

> Regards, Phil.
>
>
>
>
>
> _______________________________________________
> Unsubscribe & other changes:
> http://lists.boost.org/mailman/listinfo.cgi/boost
>


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