kotlinx-datetime icon indicating copy to clipboard operation
kotlinx-datetime copied to clipboard

No longer make Month and DayOfWeek type aliases on the JVM

Open dkhalanskyjb opened this issue 1 year ago • 2 comments

Fixes #96

dkhalanskyjb avatar Apr 03 '24 14:04 dkhalanskyjb

I actually don't remember us discussing this change. We mentioned this issue recently while discussing UUIDs and whether to make them type aliases on the JVM.

If you have doubts about this change, we can hold a meeting. What led me to go and implement this is that expect enums in common code are still non-exhaustive, which I think looks extremely strange.

dkhalanskyjb avatar Apr 19 '24 12:04 dkhalanskyjb

Yes, there are some arguments for this change, like exhaustiveness of matching over expected enum entries and being able to provide companion for static extensions (though these shortcomings will be eventually fixed in Kotlin). On the other hand, this is a binary breaking change.

ilya-g avatar Apr 19 '24 13:04 ilya-g