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

chore: rename Array.flatten to join, and upstream lemmas #5535

Closed
wants to merge 4 commits into from

Conversation

kim-em
Copy link
Collaborator

@kim-em kim-em commented Sep 30, 2024

No description provided.

@david-christiansen
Copy link
Contributor

What is the motivation for this? It's a closer match to Haskell, but I think most programmers would have an easy time guessing "flatten" and a difficult time guessing "join" for this operation.

@digama0
Copy link
Collaborator

digama0 commented Sep 30, 2024

I second David's concern, flatten is a more intuitive name while join is a monad-brained name. (I think I've said similar things about List.bind vs flatMap in the past, which IMO is even worse.)

@kim-em
Copy link
Collaborator Author

kim-em commented Oct 1, 2024

If everyone is happy with renaming List.join also to List.flatten, then I am perfectly happy to go the other way.

@kim-em
Copy link
Collaborator Author

kim-em commented Oct 2, 2024

Replaced by #5551

@kim-em kim-em closed this Oct 2, 2024
auto-merge was automatically disabled October 2, 2024 00:47

Pull request was closed

github-merge-queue bot pushed a commit that referenced this pull request Oct 2, 2024
Just the upstreaming part of #5535 while we wait on a naming decision.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants