tephen Crawley wrote:
It is NOT a logical extension of what I'm saying. I'm saying that
non-trivial finalizers should always include a call to super.finalize().

In "contract-oriented" programming more generally, every method that overrides another should super-call the latter. (The langauges Simula67 (the first object-orineted language) and BETA enforce this by turning this around: Instead of a overriding method calling super, the base methiod calls INNER to call the overriding method.)

It does NOT follow that every class should have a finalizer.

Ok.


Adding a trivial finalizer does NOT help in the event that the
programmer changes the classes position in the class hierarchy.
But having a (previously redundant) super.finalize() call in a
non-trivial finalize method may turn out to be a GOOD THING.

True. I wasn't thinking clearly.


I still don't think it is a good idea reason to call super,finalize
if super is Object - and I don't think we should warn in that case.
--
        --Per Bothner
[EMAIL PROTECTED]   http://www.bothner.com/per/



_______________________________________________
Classpath mailing list
[EMAIL PROTECTED]
http://mail.gnu.org/mailman/listinfo/classpath

Reply via email to