News for hackers. Stuff that matters.
Re:Java 21 VirtualThreads vs. Clojure Lazy Seqs (from Clojur... by pjmlp on Friday October 06, 2023 @02:23PM (#37794279)
It is still another syntax, with idioms moving away from JVM, their own little islands of Kontlin only libraries, and only works on InteliJ/Android Studio.

I don't see any value in Kotlin outside Android shops.

Re:Java 21 VirtualThreads vs. Clojure Lazy Seqs (from Clojur... by jcadam on Friday October 06, 2023 @02:45PM (#37794585)
> I don't see any value in Kotlin outside Android shops.

Developer experience is important to some people - not just devs, but those who seek to recruit and retain good ones.

Of course, if you're looking to hire massive numbers of butts-in-seats (gov work, large enterprise shops, etc) I suppose Java is probably the ideal choice.

Re:Java 21 VirtualThreads vs. Clojure Lazy Seqs (from Clojur... by Alupis on Friday October 06, 2023 @02:46PM (#37794591)
While true it has it's own syntax, the syntax is better than Java and more ergonomic. With that said, you can write Java in Kotlin - and by that I mean Kotlin code that looks almost exactly like Java. Heck, you can have .java and .kt source within the same project all mixed together if you want.

Kotlin libraries are interoperable with Java and vice versa. In some specific cases, a Kotlin library needs a little syntactic sugar to make it work with Java like a Java developer would expect, but it's easy to do. Going the other direction though - Java library used in Kotlin, zero issues, it just works. Some Java developers don't even realize they're already using Kotlin - take a look at OKHttp and friends...

Lastly, there's Kotlin support is all major IDE's, including IntelliJ of course, but also Eclipse and likely whatever editor/ide you prefer. Kotlin is basically just a bunch of libs.

I would argue Kotlin is better outside of Android than in Android. For backend work, particularly when coupled with Spring/Boot, it's freaking amazing. The Spring team has put in an impressive amount of work to make Kotlin a first-class language within the ecosystem, and it really shows.

Re:Java 21 VirtualThreads vs. Clojure Lazy Seqs (from Clojur... by pjmlp on Friday October 06, 2023 @03:36PM (#37795216)
Try to call Kotlin co-routines from Java.

Telling me there is Kotlin support in Eclipse only tells me you never actually tried it, specially after JetBrains ramped down the team that was doing the now stale plugin.

Re:Java 21 VirtualThreads vs. Clojure Lazy Seqs (from Clojur... by Alupis on Friday October 06, 2023 @03:39PM (#37795256)
You should look harder before saying it doesn't work. Updated 10/6/2023[1]

Coroutines are a specific paradigm within Kotlin, and should not be in library code anyway. With the addition of JVM Virtual Threads, the need for Coroutines is significantly diminished anyway.

It's anecdata, yes, but I've written a lot of Kotlin code and do not use coroutines. Kotlin really just lets you do what you want - as much or as little idomatic code as you need.

Kotlin on the backend is amazing. You really should give it a try. Java sucks badly, in comparison (I say that as a former Java nerd...)

[1] https://marketplace.eclipse.org/content/kotlin-plugin-eclips...

Re:Java 21 VirtualThreads vs. Clojure Lazy Seqs (from Clojur... by pjmlp on Friday October 06, 2023 @03:42PM (#37795301)
And you should read before posting random links,

   After installation of the Kotlin plugin the Java plugin is not running anymore. I cannot open a Java project anymore.

   The log file says:

   !MESSAGE org/eclipse/jdt/internal/ui/refactoring/actions/RenameJavaElementAction$AjcClosure1
   !STACK 0
   java.lang.NoClassDefFoundError: org/eclipse/jdt/internal/ui/refactoring/actions/RenameJavaElementAction$AjcClosure1
    at org.eclipse.jdt.ui.actions.RenameAction.<init>(RenameAction.java:60)
    at org.eclipse.jdt.ui.actions.RefactorActionGroup.<init>(RefactorActionGroup.java:372)
    at org.eclipse.jdt.ui.actions.RefactorActionGroup.<init>(RefactorActionGroup.java:206)
    at org.eclipse.jdt.internal.ui.packageview.PackageExplorerActionGroup.<init>(PackageExplorerActionGroup.java:139)
    at ...
Re:Java 21 VirtualThreads vs. Clojure Lazy Seqs (from Clojur... by Alupis on Friday October 06, 2023 @03:45PM (#37795322)
You copy/pasted an error some random person on the internet had in June due to using an incompatible Eclipse & plugin versions?

The beauty of Eclipse is the ecosystem. If that official Jetbrains plugin doesn't do it for you for some reason, then use another one[1].

[1] https://marketplace.eclipse.org/content/enhanced-kotlin-ecli...

Re:Java 21 VirtualThreads vs. Clojure Lazy Seqs (from Clojur... by Tainnor on Friday October 06, 2023 @03:00PM (#37794782)
"Only works on IntelliJ" is patently false. Stop spreading FUD.
Re:Java 21 VirtualThreads vs. Clojure Lazy Seqs (from Clojur... by pjmlp on Friday October 06, 2023 @03:34PM (#37795187)
Where is Kotlin support for Eclipse and Netbeans?

Prove me wrong.

Re:Java 21 VirtualThreads vs. Clojure Lazy Seqs (from Clojur... by Alupis on Friday October 06, 2023 @03:38PM (#37795241)
Do you use Eclipse? Have you looked at the available plugins?

There's nothing special about Kotlin. It's a bunch of libraries for runtime and compile time... like anything else you use.

Re:Java 21 VirtualThreads vs. Clojure Lazy Seqs (from Clojur... by pjmlp on Friday October 06, 2023 @03:40PM (#37795276)
It is my main Java IDE.

There is a difference between supporting a language with a Notepad++ like experience, and what JetBrains was doing before ramping down the Eclipse plugin team, as means to sell more InteliJ licenses instead.

Re:Java 21 VirtualThreads vs. Clojure Lazy Seqs (from Clojur... by Alupis on Friday October 06, 2023 @03:42PM (#37795302)
What do you believe you are missing?

It compiles fine with Maven or Gradle, it provides auto-prompt/complete/hints. It just works.

Re:Java 21 VirtualThreads vs. Clojure Lazy Seqs (from Clojur... by pjmlp on Friday October 06, 2023 @03:44PM (#37795317)
Same experience as in InteliJ, which JetBrains no longer provides.

And above all, no crashes left and right.

Re:Java 21 VirtualThreads vs. Clojure Lazy Seqs (from Clojur... by Alupis on Friday October 06, 2023 @03:46PM (#37795342)
I'll ask again more clearly - what is the "same experience" you are missing?

Kotlin is plugins for Maven/Gradle, and classpath libraries. There is no magic going on here...

Re:Java 21 VirtualThreads vs. Clojure Lazy Seqs (from Clojur... by pianoben on Friday October 06, 2023 @06:29PM (#37797179)
I've worked in several JVM backend projects, and Kotlin has been a stark improvement over Java (at least up through version 17, the most recent with which I've worked directly). Compose, and Compose UI, are tremendously promising technologies; I've shipped desktop apps with Kotlin for multiple platforms, and compared to just about every other desktop UI framework, it's a clear winner in terms of productivity and an ability to GSD.

All that to say, I believe that Kotlin has a lot of value, independently of Android.