On Fri, 18 May 2012 12:20:11 -0700, markspace<-@.> wrote:
On 5/18/2012 10:50 AM, Gene Wirchenko wrote:
a case of KISS or maybe YAGNI.
I like these too; good thoughts.
I have tended to avoid using OOP patterns except for what I came
up with myself. I did try reading one of the OOP patterns books, but
ugh! Some people seem to think that the last thing you should is do
in OOP is write a statement that actually instantiates an object.
(Qual horreur!) Instead, you call a factory -- is that it? -- and
have all sorts of indirection.
If you *really* need that, fine, but I do not. The closest that
I have come to this is related classes needing common code. I have
them inherit from a class with that code. That code class is never
instantiated itself.
With all of the hoopla over OOP patterns, it is difficult for me
to tell how much they are really needed.
Yes, I go for keeping it fairly simple.
risk of incompatible change. If we are talking about code that is used
in a couple of places in one program, KISS and refactor if necessary.