Proposal: Deprecate decodeUtf8

evan@evan-borden.com evan at evanrutledgeborden.dreamhosters.com
Thu Aug 18 15:13:51 UTC 2016


If the intent is to keep this function indefinitely then why abuse
DEPRECATED? Why not utilize WARNING?

On Thu, Aug 18, 2016 at 7:50 AM, Oleg Grenrus <oleg.grenrus at iki.fi> wrote:

> So (as also pointed by Edward):
>
> - Some people are aware that decodeUtf8 is partial and rely on that
> behaviour
> - Some people aren’t aware, and think that decodeUtf8 is like
> `decodeUtf8With lenientDecode` or `decodeUtf8With ignore`.
>
> Then if we add a {-# DEPRECATED #-} warning on `decodeUtf8`, we should add
> variants for both use cases
>
> lenientDecodeUtf8 which is total, and
> unsafeDecodeUtf8 or strictDecodeUtf8, which is what decodeUtf8 does today.
>
> I’d like the new names, for convenience, `OnDecodeError` values would
> require a new module import.
>
> - Oleg
>
>
> > On 18 Aug 2016, at 14:40, Niklas Hambüchen <mail at nh2.me> wrote:
> >
> > On 18/08/16 18:11, Oleg Grenrus wrote:
> >> Or should it be changed
> >>
> >> - decodeUtf8 = decodeUtf8With strictDecode
> >> + decodeUtf8 = decodeUtf8With lenientDecode
> >
> > I'd be very upset for that kind of a semantics change to sneak in under
> me.
> >
>
>
> _______________________________________________
> Libraries mailing list
> Libraries at haskell.org
> http://mail.haskell.org/cgi-bin/mailman/listinfo/libraries
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.haskell.org/pipermail/libraries/attachments/20160818/952a2be6/attachment.html>


More information about the Libraries mailing list