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
Stream#filterNot is too eager after LinearSeqOptimized changes #6440
Comments
Imported From: https://issues.scala-lang.org/browse/SI-6440?orig=1 |
@gkossakowski said: |
@gkossakowski said: Does it make sense to bring those methods back to {{LinearSeqOptimized}} and keep them in {{List}}? That would fix all of the problems and retain performance benefit for List operations, right? |
@retronym said: |
@gkossakowski said: |
@gkossakowski said: but by The reason is that we no longer delegate to I believe that changes to I don't understand why Stream mixes-in WDYT? |
@retronym said: |
@gkossakowski said: I agree on general comment. However, fixing it seems very tricky as it would require some major changes to collection hierarchy. |
@jsuereth said: |
scala/scala@2a2d9235
List
ain't the onlyLinearSeqOptimized
in town: that commit changed the performance and evaluation characteristics of the other subclasses:Stream
,Queue
,Stack
, andMutableList
.I've only highlighted the first example I've found. I really don't see how that change can be allowed -- even if you were to copy/paste the removed methods into those other subclasses, you would have broken any third party code extending this trait. You could take the position that it's just an implementation trait, which would let you remove if from the parents of List.
Update: Regressed and now broken again. See #8627
The text was updated successfully, but these errors were encountered: