Kotlin vs Swift — Enumeration

I love programming in Android and iOS platforms with Kotlin and Swift, I will demonstrate the difference and similarity of enumeration using code in this post, it is part of this language comparison series.

Definition of Enumeration

Kotlin

In Kotlin, each enum constant is an object.

enum class Direction {…