Re: Is 'Final' for classes and methods a good feature or something that should be eliminated?



Daniel T. wrote:
<snip>
It sounds to me like the blame should be placed on the lack of an
interface for the client to use, not in the fact that this particular
server isn't designed to be sub-classed.

I think, instead of insisting that 'final' is at fault, you should be
insisting that interfaces be more prevalent in the library in question.

So final isn't the problem, but an imperfect interface is. If
interfaces aren't perfect then classes and methods shouldn't be assumed
perfect by declaring them final.

Assuming no interface is perfect and no programmer can predict every
conceivable legitimate use of their code, should anything ever be
declared final?

--
Visit <http://blogs.instreamfinancial.com/anything.php>
to read my rants on technology and the finance industry.
.



Relevant Pages

  • Re: intel compiler and [REFERENCE] keyword?
    ... would not change by declaring the argument to be a character array as ... of the interface, ... compile, but have a trailing underscore on the exported function. ... the Fortran 2003 features of C interoperability or intrinsic modules. ...
    (comp.lang.fortran)
  • Re: Error signature when calling GetScriptCount of IWMHeaderInfo3
    ... public static extern uint WMCreateEditor( ... public interface IWMMetadataEditor ... public interface IWMHeaderInfo3 ... This is definitely your problem--when declaring COM interfaces ...
    (microsoft.public.windowsmedia.sdk)
  • Re: Error signature when calling GetScriptCount of IWMHeaderInfo3
    ... public static extern uint WMCreateEditor( ... public interface IWMMetadataEditor ... public interface IWMHeaderInfo3 ... This is definitely your problem--when declaring COM interfaces ...
    (microsoft.public.windowsmedia.sdk)
  • Re: avoiding writing an interface blocks
    ... arguments wouldn't require an interface on their own. ... thinking that is part of declaring the type. ... an implicit interface is - not an explicit one. ...
    (comp.lang.fortran)
  • Re: Questions of Designs
    ... This is crude way of declaring complete abstract behavior using language specific syntax. ... What's so different about the C++ ABC above and this Java interface: ...
    (comp.object)