Official Kotlin support

Hello guys,

I spent a few days reading the whole documentation and testing a few demo projects with Vaadin and I like it! My background is Kotlin and Spring framework with custom implementations and this could really help me in future.

So most important missing thing for me is the official support of Kotlin.
From what I read there are a few blockers to do so.

There also exists 3rd-party tooling but I basically don’t want to overcomplicate my the tech stack or be stuck with deprecated 3rd-party bridges in the future.

Can you please provide some insights about your roadmap for this?

I appreciate the effort that @mvysny spent on this middleware, but I would love an open discussion on how to merge it under Vaadin, and make it official for everyone.

3 Likes

Did you find some relevant github issues where this is discussed? I don’t know of any “blockers”, I think this is more like just a prioritation issue by the Vaadin product management.

I don’t know exactly. But for example Hilla is not ready with Kotlin in starter: Create a new Vaadin app: configure views and theme.

Hilla doesn’t support Kotlin properly right now because the TS generation looks at the compiled bytecode, which means we lose out on Kotlin’s nullability info. That means that types that can’t be null in Kotlin will be generated as optional in TS just like with Java.

We haven’t yet had too many people asking for Kotlin support, so it hasn’t yet been top of the list to get fixed.

I understand.

If someone is using Kotlin actively, I think Vaadin will discourage them a bit by mentioning “Java” everywhere. Now I’m also talking about Flow.

If I hadn’t seen a few videos about Vaddin recently from my favourite authors, I probably wouldn’t even consider using it after a short read of the documentation, because I don’t even enjoy writing in plain Java anymore.

Support of Kotlin could attract a lot of new developers. Including me.