-
Notifications
You must be signed in to change notification settings - Fork 87
to(Seq)
doesn't force a stream, where to[Seq]
did
#236
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
Comments
Both behaviors are legitimate. We could say that That being said, I have a preference for keeping the behavior we have in 2.13, because it makes The fact that |
No matter which is done, either So if I understand you correctly, given the status And still possibly amend the scalafix? |
Yes.
To rewrite |
In 2.13, a
Stream#to(Seq)
returns identity.In 2.12,
Stream#to[Seq]
returns aVector
, as doesStream#to(Seq)
with compat.I would argue that's a progression, not a regression, but it does introduce a semantic, potentially breaking change, both in the face of serialization and termination, when the stream isn't forced.
special-casing the scalafix for
Stream#to(Seq)
toStream#toVector
would make this change safe and obvious. That could either be obviously wrong or obviously right, both is a win.Arguably, the same should be done for any
CC#to(Seq)
whereSeq <: CC <: Stream
.The text was updated successfully, but these errors were encountered: