<@U0FLLKFJ4> ``` Functions vs Properties In some...
# announcements
v
@danlew
Copy code
Functions vs Properties

In some cases functions with no arguments might be interchangeable with read-only properties. Although the semantics are similar, there are some stylistic conventions on when to prefer one to another.

Prefer a property over a function when the underlying algorithm:

does not throw
has a O(1) complexity
is cheap to calculate (or caсhed on the first run)
returns the same result over invocations
https://kotlinlang.org/docs/reference/coding-conventions.html
7