<div dir="ltr">Changing the combinator's semantics seems likely to be worse to me. I have actual code using that function that would become much more dangerous if it started accepting data through it that it can't round trip. Right now that partiality acts as a dumb but effective safety net.<div><br></div><div>I'm neutral on the basic proposal, however.<br><div><br></div><div>-Edward</div></div></div><div class="gmail_extra"><br><div class="gmail_quote">On Thu, Aug 18, 2016 at 6:11 AM, Oleg Grenrus <span dir="ltr"><<a href="mailto:oleg.grenrus@iki.fi" target="_blank">oleg.grenrus@iki.fi</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Or should it be changed<br>
<br>
- decodeUtf8 = decodeUtf8With strictDecode<br>
+ decodeUtf8 = decodeUtf8With lenientDecode<br>
<div class="HOEnZb"><div class="h5"><br>
> On 18 Aug 2016, at 12:08, Niklas Hambüchen <<a href="mailto:mail@nh2.me">mail@nh2.me</a>> wrote:<br>
><br>
> I propose to add a deprecation pragma to the partial function<br>
> Data.Text.decodeUtf8.<br>
><br>
> I see checks or decoding failure accidentally omitted from production<br>
> code every week. I claim decodeUtf8 to be *the* most abused partial<br>
> function in the current Haskell ecosystem (with `head` and `tail` at<br>
> least everybody knows they should feel bad when typing them down).<br>
><br>
> decodeUtf8' with custom error message is a better solution in all cases<br>
> I have seen and can come up with.<br>
><br>
> I therefore propose:<br>
><br>
>  * Add deprecation pragma to decodeUtf8<br>
>  * Do it with Text.Lazy and *16/*32 functions too<br>
>  * But keep them indefinitely (we don't want to break compiles)<br>
><br>
> I believe that deprecating decodeUtf8 will result in lots of useful<br>
> warnings across the world every day and less software crashing at runtime.<br>
><br>
> Discussion period 2 months.<br>
><br>
> Thanks!<br>
> ______________________________<wbr>_________________<br>
> Libraries mailing list<br>
> <a href="mailto:Libraries@haskell.org">Libraries@haskell.org</a><br>
> <a href="http://mail.haskell.org/cgi-bin/mailman/listinfo/libraries" rel="noreferrer" target="_blank">http://mail.haskell.org/cgi-<wbr>bin/mailman/listinfo/libraries</a><br>
<br>
</div></div><br>______________________________<wbr>_________________<br>
Libraries mailing list<br>
<a href="mailto:Libraries@haskell.org">Libraries@haskell.org</a><br>
<a href="http://mail.haskell.org/cgi-bin/mailman/listinfo/libraries" rel="noreferrer" target="_blank">http://mail.haskell.org/cgi-<wbr>bin/mailman/listinfo/libraries</a><br>
<br></blockquote></div><br></div>