get, set Functions and if Statement Considered Evil
|
|
From time to time I run into a technical article that continues to perplex me for a long time. I recall two from www.javaworld.com , one is the set of articles by Alan Holub on Building User Interfaces for Object Oriented Systems, which has a particularly perplexing quote "get and set functions are evil."
I fully comprehend "new considered harmful" and still am trying to grasp "If Statement Considered Harmful". Well it turns out, there's even more, if your interested here's a list:
Inheritance Considered Harmful and this. , Object-Oriented Considered Harmful, I/O Considered Harmful, Lists with "Current" Considered Harmful, Class-Based Modeling Considered Harmful, Use Cases Considered Harmful, Eager evaluation considered Harmful
Now I haven't read all these, I probably won't, but I'm going to read over and over until I get it why "get, set Functions and if Statement Considered Evil".
Oh, I digressed, the second javaworld article Reflection vs. Code Generation, has another perplexing statement: As for code generation: the more I work with it, the more I like it. With every refactoring and increase in functionality, the code becomes clearer and more understandable. However, runtime reflection has the opposite effect. The more I increase its functionality, the more it increases in complexity.

