[jdom-interest] Request -- please allow all XML 1.1 conformant text in Element.se tText()

Chris B. chris at tech.com.au
Sun Mar 7 01:05:38 PST 2004


Jason Hunter wrote:

>> Since Java doesn't have inherited preconditions, you're just going to 
>> have to trust that people who sub-class to not violate the public 
>> API. But as Bertrand Meyer would say, it's not up to you to predict 
>> and prevent people from extending your class.
>
>
> If we exposed all internals as protected, we'd have our hands tied for 
> implementing things differently in the next version.  Anything 
> protected or public cannot change w/o breaking backward 
> compatibility.  You've got to think long term.  That's why the 
> language has the private keyword.


When you inherit and dive into the internals, you say goodbye to 
backwards compatibility. So what? If you choose to do that, it is your 
choice. Are you my nanny?







More information about the jdom-interest mailing list