this post was submitted on 05 Apr 2024
328 points (93.6% liked)

Programmer Humor

19154 readers
2012 users here now

Welcome to Programmer Humor!

This is a place where you can post jokes, memes, humor, etc. related to programming!

For sharing awful code theres also Programming Horror.

Rules

founded 1 year ago
MODERATORS
 
you are viewing a single comment's thread
view the rest of the comments
[–] [email protected] 17 points 5 months ago (2 children)

Skip step 3, and just switch to Kotlin. Worked wonders for Android

[–] [email protected] 2 points 5 months ago

Yes indeed, and it feels really good.

[–] [email protected] 1 points 5 months ago (2 children)
[–] [email protected] 10 points 5 months ago (2 children)

Kotlin is Java with all the suck taken out.

It's a modern, ergonomic language that runs on the JVM and removes as much GD boilerplate as it can.

It's fantastic.

[–] [email protected] 6 points 5 months ago (1 children)

with all the suck taken out.

You still need Gradle, so not all the suck.

[–] [email protected] 2 points 5 months ago (1 children)
[–] [email protected] 1 points 5 months ago

I'm not a huge fan of Maven either. I guess I'm just spoiled by Cargo.

[–] [email protected] 1 points 5 months ago (1 children)

Sorry, one more question. What does ergonomic mean in regards to programming languages?

[–] [email protected] 3 points 5 months ago (1 children)

Lots of little quality of life things. For instance, in Kotlin types can be marked nullable or not. When you are passing a potential null into a non-nullable argument, the compiler raises an error.

But if you had already checked earlier in scope whether or not the value was null, the compiler remembers that the value is guaranteed not to be null and won't blow up.

Same for other typechecks. Once you have asserted that a value is a given type, you don't need to cast it everywhere else. The compiler will remember.

[–] [email protected] 1 points 5 months ago

Ooh, thank you

[–] [email protected] 3 points 5 months ago

Kotlin is the tits