You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Oct 16, 2018. It is now read-only.
I do, but it's not our place to decide what that order is. Has JetBrains officially defined this yet? I know there's been discussion about it but I haven't seen anything final.
Properties and functions may often have more keywords which order is not strictly ordered in Kotlin but may be confusing. Few examples:
lateinit
on properties:private lateinit var foo: Foo
- OKlateinit private var foo: Foo
- WRONG, breaks the relation betweenlateinit
andvar
, the visibility modifier is kind of optinal (whenpublic
)abstract
on functions:protected abstract fun foo()
- OKabstract protected fun foo()
- WRONGopen
/final
on properties and functions:open protected val foo: Foo
- seems better to meprotected open val foo: Foo
final override fun foo()
- seems better to meoverride final fun foo()
Do you think such rules might be valuable in the Style Guide?
The text was updated successfully, but these errors were encountered: