Ranter
Join devRant
Do all the things like
++ or -- rants, post your own rants, comment on others' rants and build your customized dev avatar
Sign Up
Pipeless API
From the creators of devRant, Pipeless lets you power real-time personalized recommendations and activity feeds using a simple API
Learn More
Comments
-
Lasoloz5045yThe syntax might look like bullshit a few times, but I think there are really clever solutions in the language. E.g. if you start to understand why are lambdas enclosed in curly braces, then you can start writing better code structure.
-
orhun12495yYou must focus on language features more than syntax.
Sometimes Rust has shitty syntax too. -
GXGOW2715yMy code looks a lot cleaner in Kotlin compared to Java. Removes much unnecessary bloat tbf, but that's just my experience.
-
@tekashi Converting most of the times uses !! which kills the null check magic unfortunately. And you wouldn't write code the way it is converted if you used kotlin from the start. So I can't recommend doing it. Have you got an other experience with it? Tbf I used the conversion feature 2 years ago. Maybe it was improved a lot by now.
-
@ShotgunSurgeon no, i stay the fuck away from android, if i really have to make something for it i usually use react. Tried kotlin separately, felt like a cheap knockoff scala.
-
@tekashi Yes you are right it has a lot of similarities to Scala and they don't hide that they took quite some ideas from it and groovy and such. I don't do android development anymore but I built a kotlin spring boot backend once that was started in Java and was converted to kotlin. that almost killed most of the advantages kotlin offers. I still liked kotlin for its briefness
-
fuckwit12175y@orhun well yes rust has unusual syntax but I don't need two characters for the assign variable operator
For me Kotlin just doesn't flow well. Don't really know why though. I really want to give it a try but constantly need to to look up the special syntax for it.
Meanwhile in rust I spent the time fighting the borrow checker as syntax there may be strange in some parts but at least it's consistent. -
eeee31235yI love Kotlin. I understand that you hate it. It's nothing like Java if you go nuts with all the syntactic sugar available. But beware, all that sugar might incur unnecessary CPU or memory load. If not at runtime, then certainly at compile time.
So if you prefer Java, just write Java like code in Kotlin and that will work most of the time. You'll still get the benefit of the stronger and safer type system. But no true sugar, if that's what you dislike.
Android Studio will suggest more idiomatic Kotlin if you really write bad Kotlin using Java syntax patterns. That way you can have the best of both worlds! -
@orhun
"Rust has shitty syntax too."
When has rust not had shitty syntax?
Before or after the cargo cult?
Hate to learn kotlin for android. Looks bullshit.
rant