-
-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
Rename traverse_
and sequence_
in Foldable
#1723
Comments
Alternative ProposalThe type-class I suggest directly removing the methods |
I have to disagree there, |
You are right. I just thought, by the similarity of the names, that the I agree they should be renamed, but I would avoid using the word |
I think it makes sense to keep the |
I think that something like |
I actually like the name of |
The names for It is worth noting that, as discussed here, the Haskell libraries did not include a Apart from |
Also we shouldn't just be copying Haskell in this regard, because both libraries have different naming schemes. The most obvious is how I think the attempt should be for cats to actually try and use Scala's idiomatic naming scheme, in which case |
Using the same name as the standard library means that |
@LukaJCB Are you still interested in pushing for this? |
Didn't achieve critical mass, and the names are further entrenched now. Let's close it. |
I realize the underscore comes from the Haskell equivalent, but I do not believe it conveys its intent.
The two functions do the same as their non-underscore counterparts, but ignore the result returning
F[Unit]
.I suggest something along the lines of
traverseVoid
ortraverseToUnit
.This would also affect the
Reducible
type class and its non empty counterparts.Edit: Something to keep in mind, is that these two methods are already being renamed in
Reducible
as part of #1611 (traverse1_
->nonEmptyTraverse_
). So we're going to be breaking the API anyway. I think it would make a lot of sense to use this opportunity to rename these and give them a better name.The text was updated successfully, but these errors were encountered: