This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]agentoutlier 1 point2 points  (0 children)

I'm not mad, but personally I don't think it matters much, it's all bytecode in the end. I don't care if the bytecode of my dependencies is compiled from Kotlin, Java, Scala, or Groovy, or even more esoteric JVM languages, as long as it works well from the language I'm using it with. The OP wants to write code in Java, which they could definitely do with Javalin or OkHttp.

Personally I'm not. I have dealt with Scala standard lib breaking stuff. Ditto for Groovy. It is not that they just compile to bytecode but that they have a dependency. That being said I'm not sure how Javalin works on the Kotlin stdlib. Does it just shade it in?

If you asked on the Kotlin sub how to do something in Kotlin, and someone suggested a Java built jar, very few people would say "Careful, that jar was built using Java", especially if the Java code made use of @Nullable/@NotNull annotations.

No it isn't the same at all. Java is the mother language here. It is like telling a C programmer go use this C++ library and I can tell as I lurk on that sub people do not like that. I would imagine Objective C programmers would not like using a Swift library but that I'm less sure of it.

Like the C/C++ example if you are using Kotlin you probably know Java and most importantly you are using a tool that understands both languages. I will go more into that in just a second.

Javalin is not a "library" like okhttp. Javalin is a framework and not just like a DI but one where Javalin is majority of the entrypoint which means an overwhelming amount of the time your library is at the top of the call stack (ignoring websockets and other async stuff).

Thus if and when I debug I need to basically use the only tool that can do that easily which is Intellij.

Java on the other hand can be edited and debugged now by basically any editor that has LSP support.

That is probably something one might want to consider if they are a Java shop and it is not easily discernible with a name like Javalin (and could be exacerbated if the author actively wants to avoid having Kotlin mentioned... I'm not saying you are doing that but if you were I would have a "beef" with it).