Static Functions

https://discuss.kotlinlang.org/t/companion-object-vs-top-level-declaration/7538

I think it was discussed a lot of times. Global functions pollute global name space and make it hard to use auto-completion. Companion object function in most cases is much safer. I would recommend using global functions either in very small projects, or in cases you do need for them to be global.

https://stackoverflow.com/questions/49969319/kotlin-difference-between-constant-in-companion-object-and-top-level

point2: Kotlin 必须加 Observer {}

Java: mViewModel.getUiModel().observe(this, uiModel -> updateView(uiModel));

Kotlin: mViewModel.uiModel.observe(this, Observer { uiModel -> updateView(uiModel) })