@inthehands Essentially this:
```
thing.a = 5
thing.a = 5
thing.a = 5
```
should modify nothing but `a`. But those could also be composed values, the key thing is that you can assign as often as you want w/o side effects.
That's what makes a property to me, not whether it is computed or stored.
Posts
-
DEVELOPERS: Terminology poll! I am interested in your understanding of the word “property,” regardless of programming language. -
DEVELOPERS: Terminology poll! I am interested in your understanding of the word “property,” regardless of programming language.@inthehands No, the operation should just be idempotent, i.e. have no side effects. Like this:
```
final class Mehr {
var _x = 0
var y = 0var x: Int {
set {
_x = newValue
y += 1
}
get { _x }
}
}
```
I wouldn't consider `x` a "property" here because calling it 10 times will have side effects unrelated to it. This would be fine:
```
final class Meer {
var _x = 0var x: Int {
set { _x = newValue * 2 }
get { _x / 2 }
}
}
``` -
DEVELOPERS: Terminology poll! I am interested in your understanding of the word “property,” regardless of programming language.@inthehands Interesting. A property to me should have no meaningful side effects. I've seen people doing KVC properties and wondering when they run into issues because a property setter also set like 10 other unrelated things.
-
DEVELOPERS: Terminology poll! I am interested in your understanding of the word “property,” regardless of programming language.@inthehands I think the bigger issue/question is that properties are supposed to be idempotent. That's what makes it a property to me.