Live data from Hacker News

Kotlin vs. Java – An Android Developer's First Impressions

arctouch.com

11–20 of 23 posts

Re: Kotlin vs. Java – An Android Developer's First Impressions

#11
post #2

Perhaps a little off-topic, but can anyone share their experience with using Kotlin to build a non-trivial web app and what their stack was?

I work at one of those big tech companies which has a huge number of services in its codebase in Java (you could properly guess the company). We use Kotlin daily for back-end services as a cleaner and more powerful Java, and we've migrated most of our original Java spring/rest projects to be in Kotlin. If you're familiar with Java-based stacks, I think it's fairly trivial to migrate to Kotlin first as a Java substitu…

I am really interested in what company this is. I love kotlin and wish I could switch all of our new java services to kotlin going forward

Re: Kotlin vs. Java – An Android Developer's First Impressions

#12

Earlier quoted context omitted.

Works for me. Whenever you have such a complaint - and choose to make it public - please include more details. What system, what browser, add-ons (adblocker) at least. EDIT: Downvotes? For answering the question truthfully? It does work for me. The question was (is) "is anyone else unable to scroll on this page?" -- and I have no problem scrolling. I answered the question! The question was NOT "do you think the page…

It's got odd scrolling. If the mouse is over the top banner, and you scroll the scroll wheel (or I assume pull down on mobile?) then the page doesn't scroll (this is on Chrome, on Windows 10). The scrollbar is also hidden behind the top banner in some way, which suggests it's doing something non standard. Why do people want to fiddle with the most basic UI/X idiom on the net?

[deleted]

Re: Kotlin vs. Java – An Android Developer's First Impressions

#13
post #2

Perhaps a little off-topic, but can anyone share their experience with using Kotlin to build a non-trivial web app and what their stack was?

I use Kotlin for services I write. My previous stack was Kotlin + Vert.x but I've ditched Vert.x for Sparkjava more recently... not a fan of the async model.

Re: Kotlin vs. Java – An Android Developer's First Impressions

#14

Not to sound disparaging, but could this basically be summed up as "Kotlin is the syntactic sugar version of Java"? I mean, ignoring functional stuff which is in Java 8 but not on Android because Android is still(?) on Java 7, that's all I'm really seeing here.

There's a bunch of stuff the article doesn't get into, specifically Kotlin's type system which is Java-like but not quite Java's.

Re: Kotlin vs. Java – An Android Developer's First Impressions

#15

Not to sound disparaging, but could this basically be summed up as "Kotlin is the syntactic sugar version of Java"? I mean, ignoring functional stuff which is in Java 8 but not on Android because Android is still(?) on Java 7, that's all I'm really seeing here.

Android actually now has some Java 8 feature support out-of-the-box [0] though most are API 24+. After porting our code base to Kotlin we found it provides more benefits over Java than just being less typing / "syntactic sugar". To name a few: - First class functional support (streams feel clunky in comparison). - Extension functions [1]. - Nullable types (compile-time null checking). - Less verbose as types declarat…

Were the downsides manageable? Increase in APK size / build time?

Re: Kotlin vs. Java – An Android Developer's First Impressions

#16

Earlier quoted context omitted.

Works for me. Whenever you have such a complaint - and choose to make it public - please include more details. What system, what browser, add-ons (adblocker) at least. EDIT: Downvotes? For answering the question truthfully? It does work for me. The question was (is) "is anyone else unable to scroll on this page?" -- and I have no problem scrolling. I answered the question! The question was NOT "do you think the page…

It's got odd scrolling. If the mouse is over the top banner, and you scroll the scroll wheel (or I assume pull down on mobile?) then the page doesn't scroll (this is on Chrome, on Windows 10). The scrollbar is also hidden behind the top banner in some way, which suggests it's doing something non standard. Why do people want to fiddle with the most basic UI/X idiom on the net?

There doesn't seem to be a lot of critical thinking done by developers at times.

They'll read a blog post, echo chamber the benefits over some kale juice and start hacking away.

Re: Kotlin vs. Java – An Android Developer's First Impressions

#17
I'd probably be more willing to dive in with Kotlin if there were a reliable way of translating back to passable Java. In other words, an escape hatch in case it doesn't work out, or the use of a not-Java language causes too much trouble with other employees down the road.

I'm not sure how feasible that is but many features seem to have fairly direct translations. For others like co-routines I'd be willing to put up with the Java project depending on a Kotlin runtime jar.

Re: Kotlin vs. Java – An Android Developer's First Impressions

#18
post #2

Perhaps a little off-topic, but can anyone share their experience with using Kotlin to build a non-trivial web app and what their stack was?

I use Kotlin for services I write. My previous stack was Kotlin + Vert.x but I've ditched Vert.x for Sparkjava more recently... not a fan of the async model.

Async is fine but Vert.x's version of it is kind of retarded. Callback hell. Might be better with 3.4 now that it supports Scala and Futures.

Re: Kotlin vs. Java – An Android Developer's First Impressions

#19
post #2

Perhaps a little off-topic, but can anyone share their experience with using Kotlin to build a non-trivial web app and what their stack was?

I work at one of those big tech companies which has a huge number of services in its codebase in Java (you could properly guess the company). We use Kotlin daily for back-end services as a cleaner and more powerful Java, and we've migrated most of our original Java spring/rest projects to be in Kotlin. If you're familiar with Java-based stacks, I think it's fairly trivial to migrate to Kotlin first as a Java substitu…

That's very encouraging to hear. Is your team still using it with Spring (Spring Boot?) or something along those lines? If you were starting a new Kotlin REST server app today, do you think your team would still use that?

Re: Kotlin vs. Java – An Android Developer's First Impressions

#20

Not to sound disparaging, but could this basically be summed up as "Kotlin is the syntactic sugar version of Java"? I mean, ignoring functional stuff which is in Java 8 but not on Android because Android is still(?) on Java 7, that's all I'm really seeing here.

Having used Java for 7 years, and using Kotlin for the past year, I would say it's the syntactic sugar version of java in the way that Java is the syntactic sugar version of C++, which is the syntactic sugar version of C which is the syntactic sugar version of ASM, etc...
Post reply on HN