Proposal: Add {to, from}Strict conversion functions between strict and lazy ByteStrings

Henning Thielemann lemming at henning-thielemann.de
Sat Oct 29 14:27:35 CEST 2011


On Sat, 29 Oct 2011, Bas van Dijk wrote:

> On 29 October 2011 12:05, Herbert Valerio Riedel <hvr at gnu.org> wrote:
>> I propose to add optimized {to,from}Strict conversion functions between
>> strict and lazy ByteStrings to the Data.ByteString.Lazy API.
>
> +1

I remember I also missed these conversions, so add me as a supporter.


> Maybe this is bikeshedding and I'm not sure I like it but we could
> also rename these functions to:
>
> toStrict -> fromLazy
> fromStrict -> toLazy
>
> Because we nowhere mention the word 'strict' in the bytestring API but
> we do mention to word 'lazy'.

On the one hand this is correct, on the other hand the conversion 
functions will certainly reside in the Lazy module, because lazy 
bytestrings can be thought of as being build from strict bytestrings. In 
the Lazy module only the function names toStrict and fromStrict make 
sense.



More information about the Libraries mailing list