Basically what I do not understand is why people a...
# announcements
y
Basically what I do not understand is why people are using plain functions
Copy code
data class Field private constructor(val a, val b, val c) {}

fun parseFieldFrom(str: String): Field {}
instead of placing ‘em inside a companion object
Copy code
data class Field private constructor(val a, val b, val c) {
  companion object parser {
    fun parse(field: String): Field {}
  }
}
It just keeps namespaces much more cleaner. And for me it’s much more intuitive to call a
Field.parse()
instead of a
parseFieldFrom()
.