Every single template language out there does just that: Velocity, FreeMarker, StringTemplate and JSP / JSF Expression Language.
Separation of problems is what the programmer should care about, not opinion. People are expected to write the side effects of get / is / has so that everyone can name them without worrying about it. This is why these methods must be accessories, and there are methods commonly called setSomething that must be mutators.
If someone writes their own classes and decides to define a getSomething method that has a side effect, they run counter to the general belief, and the tools do not have to accept all the assumptions when working with objects, they just hope that people will be smart and respect healthy meaning and write code, as everyone else writes.
source share