re: PHP Typed Properties: Think Twice. VIEW POST

TOP OF THREAD FULL DISCUSSION
re: no, you've gained the option of doing anything else at the point of get and set - you can change your implementation - you can refactor your field ...

In my experience, to hide logic in the getter or setter is dangerous because nobody would expect something there (unless it is a visual object such a button or textbox). So, finally, the getter and setters are a dummy.

Proof, C# has properties, they are a dummy but they are short & easy to write.

int MyProp {set; get;}

code of conduct - report abuse