this post was submitted on 04 Jan 2024
52 points (88.2% liked)

Programmer Humor

32054 readers
2188 users here now

Post funny things about programming here! (Or just rant about your favourite programming language.)

Rules:

founded 5 years ago
MODERATORS
 

I wanted to learn how to make an android app and it seems to be pushing to use Kotlin (official tutorial). I thought I was going to use Java (that I know). So I'm a little lost.
Is it really better with Kotlin than Java? Is it a good investment to learn Kotlin?

I just want to be able to make android app for myself and maybe it could drive me somewhere at some point professionnally. I have a web dev formation.

you are viewing a single comment's thread
view the rest of the comments
[–] thisisawayoflife@lemmy.world 30 points 8 months ago (2 children)

Kotlin is the wave of the future. I still use Java, but I'm transitioning into using Kotlin for backend services. The devs are my work have been moving the app codebase to Kotlin for a couple of years (over a million lines) and it's pretty nice. You reduce a lot of boilerplate and the code can be a bit more dense.

[–] WilliamsStark@sh.itjust.works 4 points 8 months ago (1 children)

Ok, so if it's the new standard then I should go with Kotlin. By boilerplate, do you mean a part of the code that makes java a little too heavy?

[–] Aurenkin@sh.itjust.works 5 points 8 months ago

I don't know if this is the proper definition but I think of boilerplate as the code that's not directly related to business logic. An example I can think of in Java that's a lot nicer in Kotlin is setting all the instance variables in the constructor.

The names and types of the variables are important and useful for understanding the business logic but the actual constructor definition doesn't tell you anything if it's just assigning the constructor parameters.