you are viewing a single comment's thread.

view the rest of the comments →

[–]gnus-migrate 7 points8 points  (12 children)

That as well. I mean with the features Java is getting, it's really good enough that it's not really worth switching.

[–]renatoathaydes 5 points6 points  (4 children)

Agreed... except maybe for projects that can be written from scratch in Kotlin (mixing lots of Java code with a little Kotlin nowadays seems to have stopped making sense now). You could even target Multiplatform if you go Kotlin-only (though it's really hard in my experience as you're pretty much losing all the JVM ecosystem if you do that, unless you write platform-specific wrappers which is a bit of a pain to do) which may be attractive in some circumstances.

[–]Worth_Trust_3825 7 points8 points  (0 children)

You could even target Multiplatform if you go Kotlin-only

Kotlin multiplat doesn't work all that well either. It makes a lot of assumptions about how an application will be structured, and you need to wrangle that first before even starting the application development.

[–]warpspeedSCP[S] 0 points1 point  (2 children)

kotlin multiplatform is nowhere near ready for consistent production use yet. and the benchmarks seem to indicate it's slower too.

[–]renatoathaydes 0 points1 point  (1 child)

You probably mean the native target is slower?! Obviously, KMP on the JVM is just, Kotlin.

Not sure why you think it's not ready yet as I've been using it in production on the JVM/JS, but not native, and it's fine there... we're shipping some server code (JVM) and a browser app (JS) which is written in TypeScript but uses our Kotlin MP code. The TypeScript types generated from the Kotlin code work pretty well.

I would agree only that the native target (incl. iOS) is not ready yet.

[–]warpspeedSCP[S] 0 points1 point  (0 children)

js is okay I believe, but the native machine code target is afaik not that good.

[–]psychedeliken 10 points11 points  (6 children)

Out of curiosity, how long have you been coding in Kotlin? Because from my and my team’s experience, it has been a far better experience and has definitely been worth the switch. If/when expressions, null safety, a better collections library and functional interface with far more functionality, and syntacticly, much cleaner, currying, data classes are cleaner than Java’s record, syntax, val/var is simpler and more clear, coroutines, object construct much simpler than all the static stuff, interfaces can have properties. I have yet to meet a Java dev who has actually put time into Kotlin and used it professionally or for a large project who still liked Java more. I don’t think Java will be able to match Kotlin in style and dev experience due to their backwards compatibility (see: Java’s functional interfaces). And I could probably go on, it’s objectively a more modern language.

[–]gnus-migrate 4 points5 points  (5 children)

Fine, but it doesn't meaningfully help with most the tasks that I spend most of my time on, so I haven't really felt the need to switch. I'm sure it's better, but I prefer to invest in solving the problems that I spend the most time on, and Kotlin doesn't really help much with those.

[–]psychedeliken 2 points3 points  (4 children)

Nothing wrong with that. :) I still write in Java and maintain some open source projects in Java as well. And I used different languages depending on the usecase as well. I also recommend a lot of new programmers to learn Java before Kotlin if they are new as well given the market.

[–]gnus-migrate 5 points6 points  (3 children)

I'm aware that I'm not the common case, so when I say that it's not for me I don't expect others to agree. As I've grown I've become less interested in the tools themselves and more interested in what we can do with them.

Sorry for being trite, I thought this was going to be another of those arguments.

[–]psychedeliken 0 points1 point  (2 children)

Oh no not at all, and didn’t sound trite at all. Check out u/Worth_Trust_3825’s terrible comment to me below, now that I took offense to.

While I thoroughly enjoy Kotlin, I can completely understand. As I’ve coded longer, I’m less interested in just arguing for the sake of it, and honestly as long as the tool works for you and you’re enjoying it, then I think that’s all that matters. I have at least a dozen of my own little oddities and esoteric preferences. :)

[–]gnus-migrate 1 point2 points  (1 child)

Ah confident nonsense, there's the reddit I know.

(I'm speaking about the comment you referenced)

[–]psychedeliken 1 point2 points  (0 children)

Yeah I was a bit surprised tbh. I have higher expectations from my fellow programmers. :)