I've been catching up on Advent of Code over my holiday break. I've been using it as a playground to experiment with languages outside of my comfort zone; mainly F#, C#, and Kotlin. The last problem I solved was to find valid identifiers (longs) within a range. I solved this in Kotlin using a class called Range that would tell me if other identifiers were within it. This worked, but it left me asking what this data structure would look like in each language.
I actually found the Kotlin implementation to be more verbose than I expected. While Kotlin supports concise method bodies which greatly help with density, the rest of the declarations require a lot more than the other implementations (except for F#). For platform compatibility you need to annotate Kotlin data classes with @JvmRecord. This tells the Kotlin compiler to generate a Java record instead of a standard POJO with getters and setters.
One surprising thing that I di