Why this matters
Getters and setters can be difficult to reason about and have limited compiler support. They can introduce unexpected side effects and performance issues. Instead, use regular methods to define and modify properties unless working with frameworks that require them.