kotools / types

Explicit types for Kotlin Multiplatform.
https://types.kotools.org
MIT License
90 stars 6 forks source link

✨ New comparisons for `Zero` #650

Closed LVMVRQUXL closed 6 months ago

LVMVRQUXL commented 6 months ago

📝 Description

We want to introduce experimental comparisons for the Zero type for supporting the following Kotlin types: Byte, Short, Int, Long, Float and Double. These operations should be available for all platforms.

Here's the Application Programming Interface (API) goal:

interface Zero {
    operator fun compareTo(other: Byte): Int
    operator fun compareTo(other: Short): Int
    operator fun compareTo(other: Int): Int
    operator fun compareTo(other: Long): Int
    operator fun compareTo(other: Float): Int
    operator fun compareTo(other: Double): Int
}

🔗 Dependencies

This issue is blocked by the following ones:

✅ Checklist