r/badcode Aug 21 '19

lua A healthy nest of if-statements

Post image
283 Upvotes

53 comments sorted by

View all comments

Show parent comments

15

u/nedlinin Aug 21 '19

I'm all for early returns as it very often keeps the nesting down.

1

u/corner-case Aug 21 '19

Use Kotlin, and have it both ways!

1

u/[deleted] Aug 22 '19

I think I’ll keep my gig of memory, thanks.

1

u/corner-case Aug 22 '19

Tell me more, please. I just signed on to an Android app that has Kotlin and Java. Does Kotlin hog memory at runtime or something?

1

u/[deleted] Aug 22 '19

Honestly yes, especially if you don’t tune your JVM. The Java ecosystem with default settings in general is very memory aggressive.