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@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@haskell.org
http://mail.haskell.org/cgi-bin/mailman/listinfo/libraries