<div dir="ltr">I think it's fine the way it is, and we can just add access methods to private variables that need to be used in subclasses. e.g.<div><div style="font-family:arial,sans-serif;font-size:13px"><br class="">
<br></div><div style="font-family:arial,sans-serif;font-size:13px"><font face="courier new, monospace">var classA = fuunction() {</font></div><div style="font-family:arial,sans-serif;font-size:13px"><font face="courier new, monospace"> /** @priate */</font></div>
<div style="font-family:arial,sans-serif;font-size:13px"><font face="courier new, monospace"> var m_foo = 10;</font></div><div style="font-family:arial,sans-serif;font-size:13px"><font face="courier new, monospace"><br>
</font></div>
<div style="font-family:arial,sans-serif;font-size:13px"><font face="courier new, monospace"> this.getFoo = function(){ return m_foo; };</font></div><div style="font-family:arial,sans-serif;font-size:13px"><font face="courier new, monospace"> this.setFoo = function(foo) { m_foo = foo; };</font></div>
<div style="font-family:arial,sans-serif;font-size:13px"><font face="courier new, monospace">};</font></div></div><div><font face="courier new, monospace"><br></font></div></div><div class="gmail_extra"><br><br><div class="gmail_quote">
On Fri, Oct 4, 2013 at 1:15 PM, Aashish Chaudhary <span dir="ltr"><<a href="mailto:aashish.chaudhary@kitware.com" target="_blank">aashish.chaudhary@kitware.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div dir="ltr">Folks, <div><br></div><div>I am thinking of dropping that idea. After reading quite a bit I am convinced that its probably better not use to private variables. Just having a m_ prefix should tell developers that it is private and not be used like a public variable. </div>
<div><br></div><div>So if we had</div><div><br></div><div><font face="courier new, monospace">var classA = fuunction() {</font></div><div><font face="courier new, monospace"> /** @priate */</font></div><div><font face="courier new, monospace"> var m_foo = 10;</font></div>
<div><font face="courier new, monospace">};</font></div><div><br></div><div>Now it will be </div><div><br></div><div><font face="courier new, monospace">var classA = function() {</font></div><div><font face="courier new, monospace"> /** @priate */</font></div>
<div><font face="courier new, monospace"> this.m_foo = 10;</font></div><div><font face="courier new, monospace">};</font></div><div><br></div><div>With this change, the derived classes should be able to take advantage of it as for them it would be </div>
<div>ok to call this.m_foo directly. </div><div><br></div><div>I am very much interesting in hearing your thoughts on it. So please reply to this email asap. </div><div><br></div><div>Thanks,</div><span class="HOEnZb"><font color="#888888"><div>
<br clear="all"><div>
<br></div>-- <br>| Aashish Chaudhary <br>| R&D Engineer <br>| Kitware Inc. <br>| <a href="http://www.kitware.com" target="_blank">www.kitware.com</a>
</div></font></span></div>
<br>_______________________________________________<br>
Opengeoscience-developers mailing list<br>
<a href="mailto:Opengeoscience-developers@public.kitware.com">Opengeoscience-developers@public.kitware.com</a><br>
<a href="http://public.kitware.com/cgi-bin/mailman/listinfo/opengeoscience-developers" target="_blank">http://public.kitware.com/cgi-bin/mailman/listinfo/opengeoscience-developers</a><br>
<br></blockquote></div><br></div>