adamspeakman
05/22/2017, 9:18 PMval <T> List<T>.lastIndex: Int
get() = size - 1
And this text:
Note that, since extensions do not actually insert members into classes, there's no efficient way for an extension property to have a backing field. This is why initializers are not allowed for extension properties. Their behavior can only be defined by explicitly providing getters/setters.So if I'm reading this right, I can't actually store some value in an extension property, but rather it's a way of wrapping some custom functionality in the form of a property for convenience?