Based on my 14(+) years of C++ programming experience, I truly believe
that inheritance is highly overrated, often misunderstood and abused
therefore dangerous (among others, from security point of view). However
I'm not in the camp that are saying that all classes must be sealed by
default, because I believe that inheritance demand for strong name or
publisher identity permission gives more flexible solution for that
problem than sealing the class. Using inheritance demand means that we
can still exploit beneficial sides of inheritance for in-house
development, but will be protected from outside hackers exploiting our
design mistakes. 
They got it right when added AllowPartiallyTrustedCallersAttribute, but
regretfully they didn't made it the whole way down to allow us
customizing what kind of implicit demands should be added to all public
methods/types. It is my strong wish for the next version of .Net that it
should be possible to specify our link and inheritance demands with
AllowPartiallyTrustedCallersAttribute (please, Microsof ;-). And
evaluate them the same way as implicit FullTrust link demand (ignored
for internal calls). And let us "OR" combine several strong
name/publisher identity permissions too.

My 2c.
-Valery.

You can read messages from the Advanced DOTNET archive, unsubscribe from Advanced 
DOTNET, or
subscribe to other DevelopMentor lists at http://discuss.develop.com.

Reply via email to