http://msdn.microsoft.com/en-us/magazine/ff696765.aspx
this website shows an example
function Circle(radius) {
this.getRadius = function() {
return radius;
};
this.setRadius = function(value) {
if (value < 0) {
throw new Error('radius should be of positive value');
}
radius = value;
};
}
vs
Circle.prototype.getRadius = function() {
return this._radius;
};
Circle.prototype.setRadius = function(value) {
if (value < 0) {
throw new Error('radius should be of positive value');
}
this._radius = value;
};
and on the page it states
"However, in such case, we lose the luxury of having truly private members, and have to resort to other means such as denoting privacy through convention (underscored property names). What it usually comes down to is making a choice between having truly private members or having more efficient implementation."
how does using prototype this._ losing the luxury of "truly private" members?, does prototype.this not considered as the reference to self?