Naming: getters, setters, methods

I have to partially agree, that framework Yii3 attempts to throw lots of goody stuff from Yii2 in favour of a “new” stuff. Sometime feels almost experimental. For example this immutable concept per class - not sure where I could use it. Sounds marginal use case. I have used static members, singletons or factory. I can use encapsulation for objects. I dont object against it, just wondering whether is it worth of such a wide support within generic framework.

Immutability just makes code a little bit more predictable. There won’t be any state that is accidentally modified in another place. It’s our default code style right now but we’re not using it blindly. In some cases it just doesn’t make sense.

1 Like