-
Notifications
You must be signed in to change notification settings - Fork 52
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
Make a better story for split #97
Comments
It looks like this was discussed in idontgetoutmuch#7 but for reasons I don't know was rejected there? Doesn't make sense to me. |
FYI: I want to play with splittable generators specifically for incremental sorting of sequences (for |
@treeowl Yes we did discuss this approach at lengths when working on random-1.2.0, but we decided not to tackle this problem for that version, since there was already tremendous amount of changes being introduced and we wanted to keep breakage to a minimum. Here are my comments on your suggestion:
I thought about this issue quite a bit before, because I also share your dislike of partial functions, and I think I came up with slightly less invasive solution to this problem in #94, please let me know what you think. |
I think we should look to
Data.Bits
for inspiration here. Add a classsafeSplit
is the same assplit
, except it should only be defined for generators that are actually splittable.Question: can we improve efficiency or flexibility for any mutable generators by offering something like this?
I imagine this might be able to avoid some unnecessary copying in some cases.
The text was updated successfully, but these errors were encountered: