Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Reduce String/ByteString/PosixString variants #240

Open
hasufell opened this issue Jul 25, 2022 · 5 comments
Open

Reduce String/ByteString/PosixString variants #240

hasufell opened this issue Jul 25, 2022 · 5 comments

Comments

@hasufell
Copy link
Member

hasufell commented Jul 25, 2022

We currently have three variants of many modules. I think we should reduce these.

My idea is:

  1. String is questionable overall, maybe drop it completely in unix-3.x.x.x
  2. merge ByteString and PosixString... use PosixString for filepaths and short data (e.g. GroupEntry/UserEntry maybe) and use ByteString for file contents, lazy IO and other things where we don't know anything about size limits. RawFilePath should be dropped... it's not right.

So, ideally... there would be only one API. String will probably have to live much longer, but it could be debated to move it to a compat package some time in the future.

@hs-viktor @Bodigrim

@Bodigrim
Copy link
Contributor

I do not expect another major version bump after unix-2.8 within a year or two. I'd just wait and see how things unfold wrt string zoo in Haskell and return to this discussion later.

@NicolasT
Copy link
Contributor

Couldn't Backpack help here?

@hasufell
Copy link
Member Author

Couldn't Backpack help here?

I think no one uses that.

@NicolasT
Copy link
Contributor

Couldn't Backpack help here?

I think no one uses that.

Which is a bummer, because it's exactly the kind of functionality (ML-style modules and functors) that would reduce duplication 😄

It looks like Stack and some other non-Cabal build tools don't support it though, hence I guess it's ruled out for a library like unix. Which is a bummer. I may toy with a PoC, just to get familiar with Backpack.

@hasufell
Copy link
Member Author

String discussions seem to be currently quite popular, so we could try to source community opinions.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants