<https://github.com/JetBrains/kotlin/blob/1.9.20/C...
# javascript
e
https://github.com/JetBrains/kotlin/blob/1.9.20/ChangeLog.md#javascript Quite a long list of fixes for JS, nice, and it's still beta, so maybe more for stable.
👍 1
👍🏻 1
K 1
👍🏾 1
m
The JS changes look nice. Dropping expect/actual support for classes: not so nice.
e
They didn't drop it however, just "paywalled" basically lol, you need to pay the price of possible breaking changes in the future, but you can still use it I see
m
They haven't dropped it yet - but they downgraded it from beta (we'll do our best to minimize migration issues for you) to experimental (we may drop it any minute). For those of us who have invested significant time in writing multiplatform libraries and ports, that is not a good weather forecast.
e
Roman wrote they plan to keep them, so I would just keep using them, maybe with a little more care, but that's it
m
I saw that... let's see... the multiplatform library ecosystem is critical. I think its quite possible this change won't go down well with those library authors.
Maybe if enough multiplatform library authors provide similar feedback they would reconsider
l
Note that there is a recommended replacement (define interfaces and expect/actual a function that returns a concrete type). Only old code should be affected if the recommended method is used for new code.
m
I think Expect/actual classes (and typealias) are at central to multiplatform ports of existing code. e.g.
Copy code
public expect open class Exception : Throwable {
    constructor()
    constructor(message: String?)
    constructor(message: String?, cause: Throwable?)
    constructor(cause: Throwable?)
}

...
actual typealias kotlin.Exception = java.lang.Exception
Maybe I'm not awake enough yet, but I don't see would one replace that with an interface pattern without breaking huge amounts of existing code.