I have this code
protocol SomeProtocol {
var mustBeSettable: Int { get set }
var doesNotNeedToBeSettable: Int { get }
}
And when implement the protocol in class
class example: SomeProtocol {
doesNotNeedToBeSettable = 2
func miFunc(word: String){
doesNotNeedToBeSettable = 3
}
}
Why I can modified the variable? because it is only get.
When can i use set? or set / get