Bryan O'Sullivan | 3 Apr 05:29 2013

Proposal: simplify encoding of numbers in bytestring

The bytestring builder API has a large number of entry points for encoding numbers:

      int8Dec
    , int16Dec
    , int32Dec
    , int64Dec
    , intDec
    , integerDec

    , word8Dec
    , word16Dec
    , word32Dec
    , word64Dec
    , wordDec

Contrast this with the text library:

    decimal :: Integral a => a -> Builder

I want to deprecate the 11 *Dec functions in favour of the same single-entry-point API used by text: it's way simpler, and no less efficient.

(Really, the *Hex functions need the same treatment, but they're less of a priority to me.)
_______________________________________________
Libraries mailing list
Libraries <at> haskell.org
http://www.haskell.org/mailman/listinfo/libraries
Johan Tibell | 3 Apr 06:56 2013
Picon

Re: Proposal: simplify encoding of numbers in bytestring

On Tue, Apr 2, 2013 at 8:29 PM, Bryan O'Sullivan <bos <at> serpentine.com> wrote:
> The bytestring builder API has a large number of entry points for encoding
> numbers:
>
>       int8Dec
>     , int16Dec
>     , int32Dec
>     , int64Dec
>     , intDec
>     , integerDec
>
>     , word8Dec
>     , word16Dec
>     , word32Dec
>     , word64Dec
>     , wordDec
>
> Contrast this with the text library:
>
>     decimal :: Integral a => a -> Builder
>
> I want to deprecate the 11 *Dec functions in favour of the same
> single-entry-point API used by text: it's way simpler, and no less
> efficient.

Sounds good to me.
Milan Straka | 3 Apr 07:42 2013
Picon

Re: Proposal: simplify encoding of numbers in bytestring

Hi,

> -----Original message-----
> From: Bryan O'Sullivan <bos <at> serpentine.com>
> Sent: 2 Apr 2013, 20:29
>
> The bytestring builder API has a large number of entry points for encoding
> numbers:
> 
>       int8Dec
>     , int16Dec
>     , int32Dec
>     , int64Dec
>     , intDec
>     , integerDec
> 
>     , word8Dec
>     , word16Dec
>     , word32Dec
>     , word64Dec
>     , wordDec
> 
> Contrast this with the text library:
> 
>     decimal :: Integral a => a -> Builder
> 
> I want to deprecate the 11 *Dec functions in favour of the same
> single-entry-point API used by text: it's way simpler, and no less
> efficient.

+1 here.

Cheers,
Milan
Edward Kmett | 3 Apr 08:28 2013
Picon

Re: Proposal: simplify encoding of numbers in bytestring

+1 from me


On Wed, Apr 3, 2013 at 1:42 AM, Milan Straka <fox <at> ucw.cz> wrote:
Hi,

> -----Original message-----
> From: Bryan O'Sullivan <bos <at> serpentine.com>
> Sent: 2 Apr 2013, 20:29
>
> The bytestring builder API has a large number of entry points for encoding
> numbers:
>
>       int8Dec
>     , int16Dec
>     , int32Dec
>     , int64Dec
>     , intDec
>     , integerDec
>
>     , word8Dec
>     , word16Dec
>     , word32Dec
>     , word64Dec
>     , wordDec
>
> Contrast this with the text library:
>
>     decimal :: Integral a => a -> Builder
>
> I want to deprecate the 11 *Dec functions in favour of the same
> single-entry-point API used by text: it's way simpler, and no less
> efficient.

+1 here.

Cheers,
Milan

_______________________________________________
Libraries mailing list
Libraries <at> haskell.org
http://www.haskell.org/mailman/listinfo/libraries

_______________________________________________
Libraries mailing list
Libraries <at> haskell.org
http://www.haskell.org/mailman/listinfo/libraries
Herbert Valerio Riedel | 3 Apr 10:13 2013
Picon

Re: Proposal: simplify encoding of numbers in bytestring

"Bryan O'Sullivan" <bos <at> serpentine.com> writes:

[...]

> I want to deprecate the 11 *Dec functions in favour of the same
> single-entry-point API used by text: it's way simpler, and no less
> efficient.

+1

> (Really, the *Hex functions need the same treatment, but they're less of a
> priority to me.)

(please let's treat them in one go together with the '*Dec')

Gmane