https://kotlinlang.org logo
Title
j

jdiaz

04/14/2019, 5:07 PM
What would be the reason behind only allowing public constructors on inline classes?
k

karelpeeters

04/14/2019, 5:56 PM
Because you wouldn't be able to truly restrict Java code from "instantiating" the class.
j

jdiaz

04/14/2019, 5:57 PM
But that seems similar to internal visibility which is public in the java side
And we still don't have the good thing in Kotlin side
k

karelpeeters

04/14/2019, 5:58 PM
True, keep in mind that inline classes are experimental and subject to change. The KEEP calls them "current limitations": https://github.com/Kotlin/KEEP/blob/master/proposals/inline-classes.md#current-limitations
j

jdiaz

04/14/2019, 6:00 PM
I forgot about the KEEP, thanks I'm gonna read through it