readable code

A collection of 1 posts

A Java geek
  • Me
  • Books
  • Speaking
  • Mentions
  • Focus
Dec 15, 2019 readable code software development

Even more readable code without if-else

A couple of years ago, I wrote a post focused on how to avoid sequences of if-else statements. In that post, I demo several alternatives: the usage of proper OOP designmapswhen there’s no return, switch statements in a case. Recently, I stumbled upon a slightly more complex use-case. This post describes it, and details what additional options are available in Kotlin. Modeling a simple if…​ else sequence Let’s start with modeling a simple sequence of if-else statement

Nicolas Fränkel
A Java geek © 2008-2025
v. f32325969478592b3c56e2566b1da38f32e70c50/10035795030
Latest Posts