Live data from Hacker News

The Kotlin Foundation

kotlinlang.org

221–230 of 236 posts

Re: The Kotlin Foundation

#221

Earlier quoted context omitted.

Project Loom: https://openjdk.java.net/projects/loom/ The view being that async-await leads to a "What color is your function" problem ( https://journal.stuffwithstuff.com/2015/02/01/what-color-is-... ).

"As opposed to JVM" You don't have to convince me that green threads are far superior to async-await - I already believe that. But that's not something Kotlin (nor Java, on the language level) could have solved.

You're correct but you're forgetting that the jvm IS java. When it isn't trivial to solve at the language level they have the power to change the runtime.

Re: The Kotlin Foundation

#222
post #206

Earlier quoted context omitted.

It's way more than terse classes. The syntax everywhere is cleaner. Higher order functions look so much nicer. Using val/var is superior to having to remember to write 'final' all the time. Kotlin also handles nullability way better. Ah, also, default arguments for constructors/methods. These features prevent a lot of developer mistakes, and thus better code is often achieved. Also, Kotlin usually forges ahead on fea…

Java and JVM are developed together, Kotlin just adds syntax sugar on top. If Kotlin is so much better, why doesn't JetBrains just port everything into Kotlin/Native?

Because there are benefits to the JVM and interoperability with Java

Re: The Kotlin Foundation

#223
post #208

Kotlin as a competitive next gen language In order for Kotlin to be taken seriously outside Android, especially in relation to Swift/Rust as a native language, it needs a few changes. 1. Make the compiler native binary and competitive with other languages for startup times outside Gradle workflow. 2. Support linux CLI and make/cake work flow as a first class citizen. 3. Support Linux as a host for Kotlin multiplatfor…

> Right now C is the only true multiplatform language I have been doing pretty alright with Ada, Object Pascal, D, Go, Rust, C#, C++ and Java (yes even on iOS).

I meant KMM (Kotlin Mobile multi-platform). Not aware of write once and run twice (iOS and Android) apps in these languages.

Jetbrains recently removed working Linux support for KMM as a host platform.

Re: The Kotlin Foundation

#224
post #89

I’ve used Kotlin on Server Side in production at a pretty significant scale and I think it’s the most underrated thing for people using JVM on servers. I recently had a podcast with one of Spring dev advocates (Josh Long) https://spring.io/blog/2021/02/11/a-bootiful-podcast-doordas... (shameless plug) and brought similar discussion to table. I will seriously urge folks to try it and hopefully foundation will bring mo…

Have only used Kotlin with Spring Boot for server side REST api and the resulting code was, a lot of the time, very un-digestable. Quite ugly to the eyes. Looking to give Kotlin another shot for non-Android API consumption and it seems like Ktor is a frontrunner. Looking at Spring WebClient to consume a JSON API makes my eyes hurt compared to other languages.

Just to update any1. I gave Ktor a shot. Tried to do something very basic - consume a URL. Was using Scratch files in IntelliJ.

My god, the Ktor documentation is absurdly bad. Like horrifyingly bad. Google fu throws up results which do not have runnable code or explanation. Enough to put me off Ktor completely and continue my search. Maybe Jetbrains should drop web services framework development and focus on IDE cos Ktor is horrendous and scratch files could use some love.

Absolutely terrible API aswell.

Re: The Kotlin Foundation

#225

Earlier quoted context omitted.

Of the JVM languages, AFAIK only Kotlin is making a serious push to get off the JVM using something like LLVM. Interesting idea, though I wonder how long they can preserve compatibility between JVM and native targets. Scala native doesn't feel like it has the same impact, perhaps in part due to a lack of momentum (as I perceive it).

Clojure exists outside the JVM as well (ClojureScript, Babashka, ClojureCLR)

It does, but not in the same platform-antagonistic way. Clojure instead embraces many different platforms and runs on them through various dialects; Kotlin wants to become a platform.

Re: The Kotlin Foundation

#226

Earlier quoted context omitted.

vert.x has unfortunately reduced the support of JVM languages to Java, Kotlin and Groovy. No longer any Scala support, also no support of Javascript.

Scala support is still being finished, however the project team decide to go ahead releasing 4.0.0 at the beginning of the year avoiding the block until the Scala support work was complete. You can follow its development on GitHub or the official Discord server.

Thanks for the info. While checking out vert.x 4.0 I had a hard time figuring out language support from the release notes and blog posts.

Re: The Kotlin Foundation

#227
post #198

Earlier quoted context omitted.

It runs on the JVM. That's one of its selling points. :)

So Kotlin is useless without Java then, unable to stand on its own.

I don't know why you are replying with this like some kind of gotcha...

First of all Java and the JVM are two different things. One is a language and one is a runtime.

Yes Kotlin requires the JVM. So does Scala and a lot of other languages. Leveraging the JVM runtime means that Kotlin can inter-op with Java libraries and the ecosystem at large without having to build all those things anew. Its all upside. You get the niceties of the language plus the rich ecosystem. I can for instance leverage Apache POI in Kotlin to generate some excel workbooks despite the fact that that library is old af and doesn't know anything about Kotlin. I have in fact. It works great.

Your argument doesn't have legs to stand on. Languages like Elixir leverage existing runtimes as well. Its not uncommon and its a feature not a bug.

Re: The Kotlin Foundation

#228
post #208

Earlier quoted context omitted.

> Right now C is the only true multiplatform language I have been doing pretty alright with Ada, Object Pascal, D, Go, Rust, C#, C++ and Java (yes even on iOS).

I meant KMM (Kotlin Mobile multi-platform). Not aware of write once and run twice (iOS and Android) apps in these languages. Jetbrains recently removed working Linux support for KMM as a host platform.

Neither does KMM, as it only allows for business logic and Kotlin/Native has an incompatible memory model with the JVM ecosystem, requiring code to be explicitly written for Kotlin/Native.

Re: The Kotlin Foundation

#229
post #206

Earlier quoted context omitted.

Java and JVM are developed together, Kotlin just adds syntax sugar on top. If Kotlin is so much better, why doesn't JetBrains just port everything into Kotlin/Native?

Because there are benefits to the JVM and interoperability with Java

Apparently not, given the cargo cult hate against Java on Kotlin community, glad to "leave Java behind".

Re: The Kotlin Foundation

#230
Closed by default/final by default is a bad bad decision that reeks of premature optimization. No I don’t want to litter my code with “open” just to allow it to be extensible. Makes Kotlin a non-starters for me.
Post reply on HN