Analysis: Point should not extend Kotlin Pair#34
Closed
Conversation
Co-authored-by: bedaHovorka <5263405+bedaHovorka@users.noreply.github.com>
Co-authored-by: bedaHovorka <5263405+bedaHovorka@users.noreply.github.com>
Copilot
AI
changed the title
[WIP] Extend cz.vutbr.fit.interlockSim.util with Pair from Tuples.kt
Analysis: Point should not extend Kotlin Pair
Jan 10, 2026
|
bedaHovorka
reviewed
Jan 10, 2026
Owner
bedaHovorka
left a comment
There was a problem hiding this comment.
Thank you for analyze, we can close this pr @copilot
Owner
|
impossible implementation |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.



Issue requests analysis whether
Pointclass should extend/use Kotlin'sPair. Analysis concludes: no implementation recommended.Decision: Keep Point Independent
Pointis a domain-specific 2D coordinate type with geometric semantics. Kotlin'sPairis a generic tuple. Merging them would:point.x/y→point.first/secondPair<Int, Int>becomes a valid Pointdistance()as extension on allPair<Int, Int>instancesComparison
Precedent
Doubleton<T, V>was retained during Kotlin migration rather than replaced withPairdue to domain-specific semantics (unordered equality, associated values). Same principle applies.Kotlin Ecosystem Alignment
Standard library favors domain types over generic tuples:
kotlin.time.DurationnotPair<Long, TimeUnit>kotlin.ranges.IntRangenotPair<Int, Int>androidx.compose.ui.geometry.OffsetnotPair<Float, Float>Documentation
POINT_PAIR_ANALYSIS.md: Technical analysis with code examples, type safety implications, impact assessmentIMPLEMENTATION_SUMMARY.md: Executive summary and resolutionNo code changes. Current design is optimal.
Original prompt
💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.