On Thu, 01 Mar 2012 15:46:19 +0100, Kirk Pepperdine <[email protected]> wrote:

I can protect the underlying char[] without making the class final. Making the class final kills all chance of extending which denies developers of the tools that OO brings to the table.

It's a tough question. I personally appreciate final a lot, but it depends on the context. For instance, for a typical, self-contained open source project that can evolve quickly I'd be positive on final: you just seal everything that you don't expect to be extended. If somebody asks for a reasonable extension it's easy to remove a final in a next release. But for the JDK which is elephantiac, can't be modified and released too often I understand final can be a problem. Nevertheless, for String not having final could have opened a can of worms for security.


--
Fabrizio Giudici - Java Architect, Project Manager
Tidalwave s.a.s. - "We make Java work. Everywhere."
[email protected]
http://tidalwave.it - http://fabriziogiudici.it

--
You received this message because you are subscribed to the Google Groups "The Java 
Posse" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/javaposse?hl=en.

Reply via email to