The Getter, the Setter and the Property

July 2nd, 2006

3 Responses to “The Getter, the Setter and the Property”

  1. John Smith Says:

    Why all this effort on something so minor? My IDE generates getters and setters for me. Once they are created, I never look at them unless I need to make one do something special. This is such a minor problem. I don’t know why a small group of very vocal people keep saying this is terrible. There is nothing wrong with Java in this respect.

  2. Ignacio Coloma Says:

    Delphi and C++ Builder supported this feature eons before java. The feature was dropped by the creators of Java because it was error prone. You will never again know when a certain code snippet is simple attribute assignment or a complex method call. This is not theoretical, but real concerns when working with both environments.

    If you ask, I do not want to go back to those days when I didn’t know the meaning of the code I was reading without going back and forth. If there is a method call, I want that to be expressed in code. Aspects are a legal exception because I can find them easily and comply with the One Responsibility Rule.

  3. Duke iskandarX Says:

    Wow this is nice and best info, thanks for sharing this.

Leave a Reply