FabricMC / fabric-language-kotlin

Fabric language module for Kotlin.
Apache License 2.0
299 stars 33 forks source link

Add kotlinx-datetime library #72

Closed jakobkmar closed 2 years ago

jakobkmar commented 2 years ago

The kotlinx-datetime library provides Kotlin multiplatform support for datetime related things like Instant, Clock, LocalDateTime and so on. These classes are also serializable with kotlinx.serialization by default.

The stability of this library is in alpha, which in Kotlin terms means that the project has been officially picked up and is no longer experimental - it can be used, but the API might change and enterprises shouldn't use it in production.

It is part of the core kotlinx libraries.

https://github.com/Kotlin/kotlinx-datetime

Technici4n commented 2 years ago

The stability of this library is in alpha, which in Kotlin terms means that the project has been officially picked up and is no longer experimental - it can be used, but the API might change and enterprises shouldn't use it in production.

Not sure it should be in FLK then?

jakobkmar commented 2 years ago

In JetBrains terms alpha is a bit weird and already very useful, widely adopted and definitely stable (by that I mean bug-free, not the API). The reason kotlinx-datetime is in alpha is mostly because it isn't a full replacement for Java's time API yet.

jakobkmar commented 2 years ago

And regarding the unstable API (which is not every part of this library), users have to use the OptIn language feature to use these parts of the library - but the main things are already stable API.

modmuss50 commented 2 years ago

Reading the jetbrains documenation alpha means "use at your own risk, expect migration issues".

Do you have a need for this within your mc mod? Or is it just a nice to have? Waiting for beta might be a better idea?

jakobkmar commented 2 years ago

Or is it just a nice to have?

it's actually a must have if you are using Kotlin multiplatform and write common Kotlin code which can be compiled to all platforms, and you also need this module in your Minecraft mod

jakobkmar commented 2 years ago

use at your own risk, expect migration issues

is generally jetbrains being very careful with giving promises until they are very sure - in my opinion the library is stable enough to be included in here, from the 4 project states mentioned in the documentation the only one I think is not suitable for fabric-language-kotlin is experimental