Skip to content

Make ArraySeq extend IndexedSeqOptimized#581

Merged
lrytz merged 3 commits intoscala:mainfrom
RustedBones:typed-can-build-from
Apr 12, 2023
Merged

Make ArraySeq extend IndexedSeqOptimized#581
lrytz merged 3 commits intoscala:mainfrom
RustedBones:typed-can-build-from

Conversation

@RustedBones
Copy link
Copy Markdown

Make ArraySeq[T] extends IndexedSeqOptimized[T, ArraySeq[T]] so that operation expecting CanBuildFrom[ArraySeq[_], T, ArraySeq[T]] return specialized ArraySeq[T] instead of IndexedSeq[T].

Without this, the following can't compile

val x = ArraySeq(1, 2)
val y = ArraySeq(3, 4)
val z: ArraySeq[Int] = x ++ y

@SethTisue
Copy link
Copy Markdown
Member

@scala/collections ?

@RustedBones
Copy link
Copy Markdown
Author

Any news on this one ?

@SethTisue
Copy link
Copy Markdown
Member

@lrytz @julienrf maybe one of you would like to review this...?

Copy link
Copy Markdown
Contributor

@julienrf julienrf left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That looks good to me, and it should also bring performance improvements!

@lrytz lrytz force-pushed the typed-can-build-from branch 2 times, most recently from 15f612a to 3c71917 Compare April 12, 2023 09:27
Copy link
Copy Markdown
Member

@lrytz lrytz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍 thank you @RustedBones

@lrytz lrytz force-pushed the typed-can-build-from branch from 3c71917 to 9d64f5c Compare April 12, 2023 09:33
@lrytz lrytz merged commit cd00be9 into scala:main Apr 12, 2023
@RustedBones RustedBones deleted the typed-can-build-from branch April 12, 2023 12:06
@SethTisue SethTisue changed the title Make ArraySeq extends IndexedSeqOptimized Make ArraySeq extend IndexedSeqOptimized Apr 27, 2023
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.

4 participants