Re: [Vala] Final / Sealed classes in Vala



Hello,

Something I don't get here...  The whole point of subclassing, is to
make something old, do something new.

Yes.

Isn't that like calling any developer that might be looking at
extending your class, an idiot?  I'd have thought making sure virtuals
aren't miss-overridden, is the responsibility of proper documentation.

Yes.

Does anyone have a concrete example of where this sort of thing is
actually appropriate, just for the sake of blocking sub-classing?

I don't have useable example. Sealed or final methods or classes "can" be
optimized just in time compiler.
I didn't see any useable example for sealed (.net) or final (java) classes.
It's like the internal stuff in .Net on a so called "extensible" framework
made by a big american company.
By the way sealed doesn't protect you from overriding the class in C# 3.0
and above.
I think sealed and final stuff modifiers for classes has no need in vala.
But final like in java has also another meaning on properties or method
parameters, which marks the object as unmodifieable.

Regards
Uwe


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]