DEV Community

Ryan Westlund
Ryan Westlund

Posted on

Hierarchy of else if compression

C, Rust, Go, Javascript: else if

Julia: elseif

Ruby: elsif

Python: elif

Discussion (1)

Collapse
patarapolw profile image
Pacharapol Withayasakpunt • Edited on

Personally, I love Kotlin's style of when (x) control flow. Don't have to worry about noFallthroughCasesInSwitch as well.

Not sure about the optimization and how does it compare to pattern matching, though.