[Opengeoscience-developers] vgl protected work

Ben Burnett benbu at nyu.edu
Fri Oct 4 14:20:00 EDT 2013


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.


var classA = fuunction() {
  /** @priate */
  var m_foo = 10;

  this.getFoo = function(){ return m_foo; };
  this.setFoo = function(foo) { m_foo = foo; };
};



On Fri, Oct 4, 2013 at 1:15 PM, Aashish Chaudhary <
aashish.chaudhary at kitware.com> wrote:

> Folks,
>
> 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.
>
> So if we had
>
> var classA = fuunction() {
>   /** @priate */
>   var m_foo = 10;
> };
>
> Now it will be
>
> var classA = function() {
>     /** @priate */
>     this.m_foo = 10;
> };
>
> With this change, the derived classes should be able to take advantage of
> it as for them it would be
> ok to call this.m_foo directly.
>
> I am very much interesting in hearing your thoughts on it. So please reply
> to this email asap.
>
> Thanks,
>
>
> --
> | Aashish Chaudhary
> | R&D Engineer
> | Kitware Inc.
> | www.kitware.com
>
> _______________________________________________
> Opengeoscience-developers mailing list
> Opengeoscience-developers at public.kitware.com
>
> http://public.kitware.com/cgi-bin/mailman/listinfo/opengeoscience-developers
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://public.kitware.com/pipermail/opengeoscience-developers/attachments/20131004/59f8ffdf/attachment.html>


More information about the Opengeoscience-developers mailing list