in reply to Re^4: Why encapsulation matters
in thread Make everything an object?
The problem I generally have with OO is that most people don't know it and then they get frustrated (and rightly so).
My biggest problem with OO, is that there are a bunch of people--like you--that think they know what they are talking about, but don't.
Re-read my post to which you responded. Follow the links. Re-evaluate your knowledge and experience in the light of the credentials of the author I quoted. Consider, just briefly, whether what you are selling is stone tablet, sermon-on-the-mount material?
Or just your best guess as to "What's best practice"?
Nothing in that post can be dismissed as "the ramblings of BrowserUk". Verbatim quotes back by extensive references to a known, attributed, published author.
If you are, go argue with him.
If you're not quite so sure of yourself as when you type that diatribe above, then think carefully before responding.
You may think you know who I am, but you only know what I've told you. I have many persona's. At least three here at PM. (And no Tye, checking the IP logs won't help. All my IPs are dynamic and I have ISP accounts in Poland and Russia as well as the UK).
So, whilst I may advocate (strongly), "Examine what is said, not who speaks", sometimes, it is a very revealing exercise to consider ones own experience and knowledge in the light of those with whom one takes issue. (Note: Him, not me).
So the point I am making is not "shove everything inside of the class". It's "expose nothing until you know you need to expose it". I've found that this has worked very, very well in managing larger code bases.
And there you go, making the typical "OO cool-aid drinkers mistake". Read the article. I'll quote, directly this time, a (multiply) published author. An "expert in his field":
Encapsulation is a means, not an end. There's nothing inherently desirable about encapsulation. Encapsulation is useful only because it yields other things in our software that we care about.
The assumption, that encapsulation is king, (along with "inheritance is king", "polymorphism is king") is wrong. In so many ways. Only one of the four tenants is king: "abstraction". This can be defined as
Which is accurate, if a little pedestrian. There is another definition which is far more important though:
Whilst what you advocate or aspire to, complicates rather than simplifies, you are, as the saying goes, a part of the problem, rather than part of the solution.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^6: Why encapsulation matters
by Ovid (Cardinal) on May 19, 2008 at 12:48 UTC | |
|
Re^6: Why encapsulation matters
by Ovid (Cardinal) on May 19, 2008 at 13:23 UTC | |
by BrowserUk (Patriarch) on May 19, 2008 at 22:49 UTC | |
by Ovid (Cardinal) on May 20, 2008 at 06:04 UTC | |
by BrowserUk (Patriarch) on May 20, 2008 at 08:15 UTC | |
by Ovid (Cardinal) on May 20, 2008 at 10:16 UTC |