<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta content="text/html;charset=ISO-8859-1" http-equiv="Content-Type">
<title></title>
</head>
<body bgcolor="#ffffff" text="#000000">
+1 on everything Stefan said.<br>
Subclassing is always your friend.<br>
<br>
<br>
Stefan Andersson wrote:
<blockquote cite="mid:BLU134-W64ED5BFA0D8E76218EC44D5B80@phx.gbl"
type="cite">
<style>
.hmmessage P
{
margin:0px;
padding:0px
}
body.hmmessage
{
font-size: 10pt;
font-family:Verdana
}
</style> <br>
> > 2) Going from 'private' to 'protected' because of the need to
<br>
> > subclass in a particular proprietary application should never
be a <br>
> > problem. This strenghtens the API.<br>
> <br>
> This is not always the case. See
<a class="moz-txt-link-freetext" href="http://opensimulator.org/mantis/view.php?id=3072">http://opensimulator.org/mantis/view.php?id=3072</a>. Sometimes there are
good reasons <br>
> for keeping methods private.<br>
<br>
I think that discussion has to be separated; I don't know the reason
for those members to be kept private (other than that the plugin
'wasn't intended to be subclassed' which is fair enough) but I can say
that generally the only reason to hesitate over going from 'private' to
'protected' is if code is written so that state integrity is pivotal
for method execution - something that usually points to the code being
brittle in the first place. (Compare with calling virtual members from
constructors for a similar concern)<br>
<br>
I am perfectly aware that this is touching on religion so I won't push
the issue further; suffice to say that "in most cases" we should not
have a problem with it.<br>
<br>
For the interested, I suggest you google for religious flame wars on
the proper use of "internal" and "sealed" as well. ;-)<br>
<br>
By the way, I take your +1's as meaning we're discussing this in order
to form an explicit concensus - if I have recieved no strong
objections, I will add this to the code conventions by friday 20/2 2009.<br>
<br>
Best Regards,<br>
/Stefan<br>
<br>
<pre wrap="">
<hr size="4" width="90%">
_______________________________________________
Opensim-dev mailing list
<a class="moz-txt-link-abbreviated" href="mailto:Opensim-dev@lists.berlios.de">Opensim-dev@lists.berlios.de</a>
<a class="moz-txt-link-freetext" href="https://lists.berlios.de/mailman/listinfo/opensim-dev">https://lists.berlios.de/mailman/listinfo/opensim-dev</a>
</pre>
</blockquote>
<br>
</body>
</html>