haskell / haskell/text

`decodeUtf8` / `decodeUtf8'` situation

Open
#247 11 comments 2 reactions 0 assignees View on GitHub
documentation feature request
Dominant language
Haskell
Stars
421
Forks
163
PR merge metrics
No merged PRs in 30d

Description

There are a few issues with the current situation:

+ Decoding/encoding from UTF-8 is a really common use case, but requires a separate import (`Data.Text.Encoding`)
+ The best name (`decodeUtf8`) is taken by the partial version of the function
+ `decodeUtf8'` doesn't mean anything, you just have to know the `'` means it's the total version

Is there anything we could do to improve this situation? It doesn't bother me, but it's tough on people that are new to haskell. I know we're constrained by backwards compatibility here because so many packages use `text`, but I thought it would be worth thinking about.

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.