| 
	
 | 
 Posted by Tony Marston on 12/05/06 10:20 
"Curtis" <dyer85@gmail.com> wrote in message  
news:1165238811.552595.234690@16g2000cwy.googlegroups.com... 
> Tony Marston wrote: 
>> No, encapsulation is not about making everything private, it is about 
>> putting data and the operations which act upon that data into a single 
>> class. The ability to make certain operations or pieces of data private  
>> or 
>> protected is OPTIONAL, not MANDATORY. 
> 
> I never claimed to summarize the entirety of encapsulation as the act 
> of making EVERYTHING private, I was merely restating in my own words to 
> try and clarify my understanding. 
> 
>> I am not saying that you MUST NOT make things private/protected, I am  
>> simply 
>> arguing against the statement that you MUST use the private/protected 
>> option. The point is that his is entirely OPTIONAL and is a matter of 
>> personal preference. 
> 
> You seem to be best friends with the straw man fallacy. 
 
So do otherpeople in this newsgroup. 
 
>> As for saying that you MUST make all data private and access it through 
>> getters and setters, you obviously haven't read 
>> http://www.javaworld.com/javaworld/jw-09-2003/jw-0905-toolbox.html 
> 
> The sources I've gathered, although differ slightly in diction, 
> generally concur on the meaning of encapsulation 
 
Not everybody agrees on what encapsulation is. Not everybody agrees on what  
OO is. For every opinion there is a different opinion. Some features are  
optional, so it is a matter of personal preference whether to use them or  
not. 
 
>. It is true that not 
> all experts in a field will agree on everything, but the areas in which 
> there is genuine knowledge are not up for debate or subject to opinion. 
 
I disagree. Absolutely everything is open to debate and subject to different  
opinions. 
 
> You may be confusing semantics for the actual act of implementation, in 
> this case. 
> 
> Please don't put words in my mouth. I never said that you MUST do 
> anything. Honestly, the source you cited is extremely dubious. Nearly 
> every comment questions Allen Holub's credibility. This is not an 
> authoritative source, by any means. One commenter even states: 
> 
> "We have countless of examples of projects / systems that were and are 
> successful (the Java source code itself being one) using OO concepts 
> that are contrary to what Holub advocates. In other words, most of us 
> has been successful doing what he says we shouldn't do and what he 
> claims won't work well." 
 
That just goes to prove that for every opinion there is a different opinion. 
 
--  
Tony Marston 
http://www.tonymarston.net 
http://www.radicore.org
 
  
Navigation:
[Reply to this message] 
 |