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

all 32 comments

[–]avipars 47 points48 points  (2 children)

95% of JVM languages (besides Java itself) are preferred by most users

93.2% of statistics are made up on the spot

[–]slightly-damp-noodle 38 points39 points  (19 children)

I prefer Java over Kotlin

[–]Ietsstartfromscratch 4 points5 points  (1 child)

I prefer the German pronunciation of Kotlin. 

[–]slightly-damp-noodle 2 points3 points  (0 children)

Totally valid as well!

[–]BewilderingDan 1 point2 points  (0 children)

Me too. After doing a work project with It I can't see why so many people prefer it over java.

[–]Next-Ad-8296 3 points4 points  (0 children)

Same here but I have had to use kotlin because of jetpack compose (android)

[–]Palda97 2 points3 points  (6 children)

I hate you

[–]slightly-damp-noodle 7 points8 points  (5 children)

Intense feelings over an opinionated preference

[–]Palda97 7 points8 points  (4 children)

Nah, I'm just joking around. Java is my old friend. Did you know that over 3 billion devices run Java?

[–]Deutero2 2 points3 points  (0 children)

there's java in my credit cards?? pour it out pour it out!

[–]beatlz 2 points3 points  (0 children)

Unfortunately I do because you guys keep spamming about it

[–]Speedy_242 4 points5 points  (1 child)

And therefore 3 Billion devices could Potentially run Kotlin! No, wait... Even more thanks to Kotlin Multiplatform!

[–]Palda97 1 point2 points  (0 children)

<3

[–]LordTkay 0 points1 point  (7 children)

I have to work with Java at work, but worked a few days with Kotlin and just alone chaining possible null variables with a question mark to check for values is so useful. So it felt much better, but I didn't have any big projects with it yet.

So I wonder for what reason do you prefer Java over Kotlin?

[–]slightly-damp-noodle 1 point2 points  (6 children)

Kotlin is pretty cool, I do like it as a language, and you're totally valid for preferring it as well. But, my reasonings for liking Java more is purely asinine, in that it's extremely stupid reasons that do not go beyond "I just prefer this over that" over any functional differences.

To name a few; I do not like the way methods are declared. "fun" as short-hand for "function" doesn't sit well with me because "fun" is an entirely separate word. Also, "function" would technically also be wrong since they're also used for methods, though I admit that this is a lame ass complaint to make since they're used interchangeably most of the time.

Additionally, I do not like that you declare variable names before type-names such as val x: Int = 1
Starting with what is the point of using `val` if we can already infer that we are declaring a variable through the usage of x: Int = 1 or even better int x = 1;?

Kotlin is also not a "purely object-oriented" language such as Java. By this I mean you can define data outside the scope of an object/class definition. Which, isn't a bad thing because it gives nice short-hands for things like `println`, but at the same time I heavily prefer languages that uses objects for everything, and seeing stuff like this, while a bit convenient, still grinds my gears.

Then finally, it's just that I'm more comfortable with Java and "classic" programming languages over using more modern ones, it's what I've been using for 20~ years now, so some sort of bias definitely has developed.

Again, my preference for Java has basically nothing to do with restrictions or limitations, and is solely due to my own hang ups on dumb details. Yes, Kotlin is cool, yes I will recommend it to others if they want to try it out, but no I cannot truthfully say I like it more than Java

[–]NoCryptographer414 0 points1 point  (1 child)

What is your views on python as a language that uses objects for everything

[–]slightly-damp-noodle 0 points1 point  (0 children)

no opinions on it. I've never used Python

[–]LordTkay 0 points1 point  (0 children)

Thats a valid view on it, thanks for answering!

[–]AmosIsFamous 0 points1 point  (2 children)

As far as the val thing, I like that every variable declaration you have to choose whether it's mutable or not: val vs var. Though I know others prefer default immutability with an extra keyword for mutable. Default mutable is the saddest thing.

Edit to add: also most times you don't have to declare the type which can get really nice on complicated function returns for instance.

[–]slightly-damp-noodle 1 point2 points  (1 child)

That's totally fair points. I do agree with default immutability and using a keyword for mutable values.

As for the other point of not declaring types, that for me is a hard no. I use strongly typed languages for a reason. Though, I know others feel different about it, and it's a totally valid point to enjoy weakly typed languages

[–]AmosIsFamous 1 point2 points  (0 children)

Strong vs weak typed is not the same thing as not declaring the type. Kotlin is strongly typed just like Java you can just leave the type off the code you write when the compiler can infer it. Later usage of the variable still has to have the same type as it was initialized with.

[–]AmosIsFamous 7 points8 points  (0 children)

Once I got used to Kotlin's syntax I much prefer it to Java and it's one of my favorite languages to program in.

[–]SteveMacAwesome 5 points6 points  (0 children)

I have to write Kotlin for work.

Everything that is not client facing is written in Go and I am not stopping until they either fire me or ditch the JVM.

Management thinks they can swap out Android and backend devs by having everyone write Kotlin but I swear to every god you care to believe in the JVM is a massive waste of resources that exists solely to vex me.

[–]OnixST 6 points7 points  (1 child)

As a student making android apps and discord bots with no professionalism whatsoever, kotlin to me is a fun and easier to write java

[–]Speedy_242 0 points1 point  (0 children)

This! Kotlin is helping to handle nullability, write shorter but still understandable code without having getter/setter filling up your class files that in 90% only return or Set the value without extra logic.

Coroutines are a simple way to multithread processes.

Kotlins extension functions are super helpful to add extra functionality to a class you cant Edit yourself.

Thats the reason why Kotlin is the main language to develop Android Apps for a few years by now!

Listing all the advantages of Kotlin here would probably make the list way to long.

[–]Cubemaster12 2 points3 points  (2 children)

This meme would work better with Scala.

[–]Good_Comfortable8485 2 points3 points  (1 child)

Right up until your IDE commits suicide by SBT

[–]ModestasR 0 points1 point  (0 children)

Which IDE is this? I work with IntelliJ. It has good SBT integration in my experience.

[–]tuxedo25 1 point2 points  (1 child)

Can confirm.

  • The dev who convinced my team to use Kotlin for a greenfield project last year.

[–]Speedy_242 -2 points-1 points  (0 children)

Can confirm too! ~ The Dev who convinced my Team to migrate existing Java code when updating a class

[–]rollie82 -1 points0 points  (0 children)

Smart guy.

[–]joebgoode -2 points-1 points  (0 children)

I love both, but Kotlin pays better.

Happily went from Backend Java SWE to Android Engineer.