<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	>
<channel>
	<title>Comments on: JavaScript: how to get private, privileged, public and static members (properties and methods)</title>
	<atom:link href="http://www.robertnyman.com/2008/10/14/javascript-how-to-get-private-privileged-public-and-static-members-properties-and-methods/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.robertnyman.com/2008/10/14/javascript-how-to-get-private-privileged-public-and-static-members-properties-and-methods/</link>
	<description>Web development and Internet trends</description>
	<pubDate>Tue, 06 Jan 2009 10:41:04 +0000</pubDate>
	<generator>http://wordpress.org/?v=2.6.1</generator>
		<item>
		<title>By: Robert Nyman</title>
		<link>http://www.robertnyman.com/2008/10/14/javascript-how-to-get-private-privileged-public-and-static-members-properties-and-methods/#comment-488865</link>
		<dc:creator>Robert Nyman</dc:creator>
		<pubDate>Mon, 22 Dec 2008 19:46:22 +0000</pubDate>
		<guid isPermaLink="false">http://www.robertnyman.com/?p=888#comment-488865</guid>
		<description>John,

Yeah, basically. A privileged method can access private members, whereas, in more regular languages, public methods can't really do that.</description>
		<content:encoded><![CDATA[<p>John,</p>
<p>Yeah, basically. A privileged method can access private members, whereas, in more regular languages, public methods can&#8217;t really do that.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: John T</title>
		<link>http://www.robertnyman.com/2008/10/14/javascript-how-to-get-private-privileged-public-and-static-members-properties-and-methods/#comment-488734</link>
		<dc:creator>John T</dc:creator>
		<pubDate>Mon, 22 Dec 2008 10:53:13 +0000</pubDate>
		<guid isPermaLink="false">http://www.robertnyman.com/?p=888#comment-488734</guid>
		<description>Basic question really:

I can't see any difference in the syntax for a privileged method and a public method (when not using prototype) so... is a method called public/privileged based on the variables it access?

Thanks in advance

JT.</description>
		<content:encoded><![CDATA[<p>Basic question really:</p>
<p>I can&#8217;t see any difference in the syntax for a privileged method and a public method (when not using prototype) so&#8230; is a method called public/privileged based on the variables it access?</p>
<p>Thanks in advance</p>
<p>JT.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: JavaScript inheritance - experimenting with syntax alternatives and private variables - Robert&#8217;s talk - Web development and Internet trends</title>
		<link>http://www.robertnyman.com/2008/10/14/javascript-how-to-get-private-privileged-public-and-static-members-properties-and-methods/#comment-466691</link>
		<dc:creator>JavaScript inheritance - experimenting with syntax alternatives and private variables - Robert&#8217;s talk - Web development and Internet trends</dc:creator>
		<pubDate>Tue, 21 Oct 2008 21:08:08 +0000</pubDate>
		<guid isPermaLink="false">http://www.robertnyman.com/?p=888#comment-466691</guid>
		<description>[...] for more information about inheritance - intrigued by the concept myself, and also inspired by Andrea Giammarchi&#8217;s comment , I though I&#8217;d come up with some scary [...]</description>
		<content:encoded><![CDATA[<p>[...] for more information about inheritance - intrigued by the concept myself, and also inspired by Andrea Giammarchi&#8217;s comment , I though I&#8217;d come up with some scary [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Robert Nyman</title>
		<link>http://www.robertnyman.com/2008/10/14/javascript-how-to-get-private-privileged-public-and-static-members-properties-and-methods/#comment-465124</link>
		<dc:creator>Robert Nyman</dc:creator>
		<pubDate>Fri, 17 Oct 2008 08:50:57 +0000</pubDate>
		<guid isPermaLink="false">http://www.robertnyman.com/?p=888#comment-465124</guid>
		<description>Bleyder,

Glad that you liked it! :-)</description>
		<content:encoded><![CDATA[<p>Bleyder,</p>
<p>Glad that you liked it! <img src='http://www.robertnyman.com/wp-includes/images/smilies/icon_smile.gif' alt=':-)' class='wp-smiley' /></p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Bleyder</title>
		<link>http://www.robertnyman.com/2008/10/14/javascript-how-to-get-private-privileged-public-and-static-members-properties-and-methods/#comment-465082</link>
		<dc:creator>Bleyder</dc:creator>
		<pubDate>Fri, 17 Oct 2008 08:08:47 +0000</pubDate>
		<guid isPermaLink="false">http://www.robertnyman.com/?p=888#comment-465082</guid>
		<description>Very simple and really helpfull post. I'm waiting another one related with this topic.

Thanks!!</description>
		<content:encoded><![CDATA[<p>Very simple and really helpfull post. I&#8217;m waiting another one related with this topic.</p>
<p>Thanks!!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Robert Nyman</title>
		<link>http://www.robertnyman.com/2008/10/14/javascript-how-to-get-private-privileged-public-and-static-members-properties-and-methods/#comment-464476</link>
		<dc:creator>Robert Nyman</dc:creator>
		<pubDate>Thu, 16 Oct 2008 17:42:41 +0000</pubDate>
		<guid isPermaLink="false">http://www.robertnyman.com/?p=888#comment-464476</guid>
		<description>Andrea,

Well, they're shared by instances, so-to-say, but not by prototype methods, and that's what Adam was aiming for.

Also, good posting the link, it's good to have in this context!</description>
		<content:encoded><![CDATA[<p>Andrea,</p>
<p>Well, they&#8217;re shared by instances, so-to-say, but not by prototype methods, and that&#8217;s what Adam was aiming for.</p>
<p>Also, good posting the link, it&#8217;s good to have in this context!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Andrea Giammarchi</title>
		<link>http://www.robertnyman.com/2008/10/14/javascript-how-to-get-private-privileged-public-and-static-members-properties-and-methods/#comment-464418</link>
		<dc:creator>Andrea Giammarchi</dc:creator>
		<pubDate>Thu, 16 Oct 2008 16:35:40 +0000</pubDate>
		<guid isPermaLink="false">http://www.robertnyman.com/?p=888#comment-464418</guid>
		<description>Guys, again do not make confusion, private variables are always shared by instances since these are in the prototype, whatever scope it has. I wrote these details in my document, Robert if you do not mind I would like to post it again: http://www.3site.eu/doc/

Kind Regards :)</description>
		<content:encoded><![CDATA[<p>Guys, again do not make confusion, private variables are always shared by instances since these are in the prototype, whatever scope it has. I wrote these details in my document, Robert if you do not mind I would like to post it again: <a href="http://www.3site.eu/doc/" rel="nofollow">http://www.3site.eu/doc/</a></p>
<p>Kind Regards <img src='http://www.robertnyman.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /></p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Robert Nyman</title>
		<link>http://www.robertnyman.com/2008/10/14/javascript-how-to-get-private-privileged-public-and-static-members-properties-and-methods/#comment-463206</link>
		<dc:creator>Robert Nyman</dc:creator>
		<pubDate>Wed, 15 Oct 2008 17:37:39 +0000</pubDate>
		<guid isPermaLink="false">http://www.robertnyman.com/?p=888#comment-463206</guid>
		<description>Adam,

I think I will write one, in some form at least. :-)</description>
		<content:encoded><![CDATA[<p>Adam,</p>
<p>I think I will write one, in some form at least. <img src='http://www.robertnyman.com/wp-includes/images/smilies/icon_smile.gif' alt=':-)' class='wp-smiley' /></p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Adam Silver</title>
		<link>http://www.robertnyman.com/2008/10/14/javascript-how-to-get-private-privileged-public-and-static-members-properties-and-methods/#comment-463204</link>
		<dc:creator>Adam Silver</dc:creator>
		<pubDate>Wed, 15 Oct 2008 17:36:19 +0000</pubDate>
		<guid isPermaLink="false">http://www.robertnyman.com/?p=888#comment-463204</guid>
		<description>Ah ha!  I see!  You need to do a blog post on all this stuff, because I need to be writing my classes with the prototype much more often :)</description>
		<content:encoded><![CDATA[<p>Ah ha!  I see!  You need to do a blog post on all this stuff, because I need to be writing my classes with the prototype much more often <img src='http://www.robertnyman.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /></p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Robert Nyman</title>
		<link>http://www.robertnyman.com/2008/10/14/javascript-how-to-get-private-privileged-public-and-static-members-properties-and-methods/#comment-463202</link>
		<dc:creator>Robert Nyman</dc:creator>
		<pubDate>Wed, 15 Oct 2008 17:32:13 +0000</pubDate>
		<guid isPermaLink="false">http://www.robertnyman.com/?p=888#comment-463202</guid>
		<description>Adam,

Ah, I see what you mean. That does indeed work.
The problem with it, however, is that the prototype for MyClass becomes an anonymously created object, where you declare the public method &lt;code&gt;getPrivate&lt;/code&gt; inline in the constructor, instead of using a prototype.

I.e. each instance would have to create its own &lt;code&gt;getPrivate&lt;/code&gt; method, instead of using the one inherited down through the prototype chain.</description>
		<content:encoded><![CDATA[<p>Adam,</p>
<p>Ah, I see what you mean. That does indeed work.<br />
The problem with it, however, is that the prototype for MyClass becomes an anonymously created object, where you declare the public method <code>getPrivate</code> inline in the constructor, instead of using a prototype.</p>
<p>I.e. each instance would have to create its own <code>getPrivate</code> method, instead of using the one inherited down through the prototype chain.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Adam Silver</title>
		<link>http://www.robertnyman.com/2008/10/14/javascript-how-to-get-private-privileged-public-and-static-members-properties-and-methods/#comment-463192</link>
		<dc:creator>Adam Silver</dc:creator>
		<pubDate>Wed, 15 Oct 2008 17:21:32 +0000</pubDate>
		<guid isPermaLink="false">http://www.robertnyman.com/?p=888#comment-463192</guid>
		<description>Hi Robert

Can you not do the following:

&lt;code&gt;
			var MyClass = function() {
			}	
			MyClass.prototype = new(function(){
				var privateVar = 1;
				
				function getPrivate() {
					return privateVar;
				}
				
				this.getPrivate = getPrivate;
			});
			var myInstance = new MyClass();
			alert(myInstance.getPrivate()); // this alerts 1
&lt;/code&gt;

I just tested and it seemed to work.</description>
		<content:encoded><![CDATA[<p>Hi Robert</p>
<p>Can you not do the following:</p>
<p><code><br />
			var MyClass = function() {<br />
			}<br />
			MyClass.prototype = new(function(){<br />
				var privateVar = 1;</p>
<p>				function getPrivate() {<br />
					return privateVar;<br />
				}</p>
<p>				this.getPrivate = getPrivate;<br />
			});<br />
			var myInstance = new MyClass();<br />
			alert(myInstance.getPrivate()); // this alerts 1<br />
</code></p>
<p>I just tested and it seemed to work.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Robert Nyman</title>
		<link>http://www.robertnyman.com/2008/10/14/javascript-how-to-get-private-privileged-public-and-static-members-properties-and-methods/#comment-463175</link>
		<dc:creator>Robert Nyman</dc:creator>
		<pubDate>Wed, 15 Oct 2008 17:05:10 +0000</pubDate>
		<guid isPermaLink="false">http://www.robertnyman.com/?p=888#comment-463175</guid>
		<description>Adam,

Interesting thinking!
The problem, however, with that approach is that you can't access that private variable in any other method for the object. I.e., this won't work:

&lt;code&gt;
MyClass.prototype.getPrivate = function(){
			    return myPrivateMember;
			};&lt;/code&gt;

With Andrea's solution above, it is possible with private variables accessible to all methods, as long as they're declared within the closure, but outside the constructor.

Maybe I should write a post explaining what Andrea touched on above, with private members, to have it more easy to overview than in the comments.</description>
		<content:encoded><![CDATA[<p>Adam,</p>
<p>Interesting thinking!<br />
The problem, however, with that approach is that you can&#8217;t access that private variable in any other method for the object. I.e., this won&#8217;t work:</p>
<p><code><br />
MyClass.prototype.getPrivate = function(){<br />
			    return myPrivateMember;<br />
			};</code></p>
<p>With Andrea&#8217;s solution above, it is possible with private variables accessible to all methods, as long as they&#8217;re declared within the closure, but outside the constructor.</p>
<p>Maybe I should write a post explaining what Andrea touched on above, with private members, to have it more easy to overview than in the comments.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Adam Silver</title>
		<link>http://www.robertnyman.com/2008/10/14/javascript-how-to-get-private-privileged-public-and-static-members-properties-and-methods/#comment-463137</link>
		<dc:creator>Adam Silver</dc:creator>
		<pubDate>Wed, 15 Oct 2008 16:23:55 +0000</pubDate>
		<guid isPermaLink="false">http://www.robertnyman.com/?p=888#comment-463137</guid>
		<description>Hi there, I actually just sent you an email Robert.

With regards to using private methods and variable on the prototype, I believe you can do the following:
&lt;code&gt;
var MyClass = function() {
}

MyClass.prototype = new (function(){
this.myPublicMember = "public";
var myPrivateMember = "private";
});
&lt;/code&gt;

I would love to see a post on using the prototype in much more detail.

Thanks</description>
		<content:encoded><![CDATA[<p>Hi there, I actually just sent you an email Robert.</p>
<p>With regards to using private methods and variable on the prototype, I believe you can do the following:<br />
<code><br />
var MyClass = function() {<br />
}</p>
<p>MyClass.prototype = new (function(){<br />
this.myPublicMember = "public";<br />
var myPrivateMember = "private";<br />
});<br />
</code></p>
<p>I would love to see a post on using the prototype in much more detail.</p>
<p>Thanks</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Robert Nyman</title>
		<link>http://www.robertnyman.com/2008/10/14/javascript-how-to-get-private-privileged-public-and-static-members-properties-and-methods/#comment-462919</link>
		<dc:creator>Robert Nyman</dc:creator>
		<pubDate>Wed, 15 Oct 2008 12:07:37 +0000</pubDate>
		<guid isPermaLink="false">http://www.robertnyman.com/?p=888#comment-462919</guid>
		<description>Andrea,

Yeah, exactly my thinking. :-)</description>
		<content:encoded><![CDATA[<p>Andrea,</p>
<p>Yeah, exactly my thinking. <img src='http://www.robertnyman.com/wp-includes/images/smilies/icon_smile.gif' alt=':-)' class='wp-smiley' /></p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Andrea Giammarchi</title>
		<link>http://www.robertnyman.com/2008/10/14/javascript-how-to-get-private-privileged-public-and-static-members-properties-and-methods/#comment-462900</link>
		<dc:creator>Andrea Giammarchi</dc:creator>
		<pubDate>Wed, 15 Oct 2008 11:38:36 +0000</pubDate>
		<guid isPermaLink="false">http://www.robertnyman.com/?p=888#comment-462900</guid>
		<description>True Robert, that approach is for private methods, not for private variables.
We could have private variables outside the constructor as well, but those will be shared from every instance, so will be more like private static variables :)</description>
		<content:encoded><![CDATA[<p>True Robert, that approach is for private methods, not for private variables.<br />
We could have private variables outside the constructor as well, but those will be shared from every instance, so will be more like private static variables <img src='http://www.robertnyman.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /></p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Robert Nyman</title>
		<link>http://www.robertnyman.com/2008/10/14/javascript-how-to-get-private-privileged-public-and-static-members-properties-and-methods/#comment-462882</link>
		<dc:creator>Robert Nyman</dc:creator>
		<pubDate>Wed, 15 Oct 2008 11:14:53 +0000</pubDate>
		<guid isPermaLink="false">http://www.robertnyman.com/?p=888#comment-462882</guid>
		<description>Andrea,

Thank you! It passed my mind while writing to Andrew, but naturally, a closure with the constructor (and returning the constructor as well) together with private members is a possible approach.

The only downside, structure-wise, from that is that you can't define anything private in the actual constructor, and access from somewhere else.</description>
		<content:encoded><![CDATA[<p>Andrea,</p>
<p>Thank you! It passed my mind while writing to Andrew, but naturally, a closure with the constructor (and returning the constructor as well) together with private members is a possible approach.</p>
<p>The only downside, structure-wise, from that is that you can&#8217;t define anything private in the actual constructor, and access from somewhere else.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Andrea Giammarchi</title>
		<link>http://www.robertnyman.com/2008/10/14/javascript-how-to-get-private-privileged-public-and-static-members-properties-and-methods/#comment-462860</link>
		<dc:creator>Andrea Giammarchi</dc:creator>
		<pubDate>Wed, 15 Oct 2008 10:30:27 +0000</pubDate>
		<guid isPermaLink="false">http://www.robertnyman.com/?p=888#comment-462860</guid>
		<description>I wrote a couple of articles about all these questions, with solutions for emulated protected methods and problem explanation for shared in scope private variables (already linked in another Robert post)

Anyway, as Robert said, for the private variable usable via instance we need privileged methods, specially since Mozilla removed the second argument from eval function :P

Finally, with a dedicated closure it is possible to define prototypes that use private methods, always in that scope, so privileged method are usually not necessary at all ;)

&lt;code&gt;
function Person(name){
	this.name = name;
};

(function(){

	// shared private method
	function _getName(){
		return "My name is " + this.name;
	};
	
	Person.prototype.getName = function(){
		return _getName.call(this);
	};
})();
&lt;/code&gt;
Of course the constructor could be inside the closure as well, something like:
&lt;code&gt;
Person = (function(){ // closure for everything
	function Person(){};
	Person.prototype.dostuff = function(){ ... };	
	return Person;
})();
&lt;/code&gt;
just to preserve the Function.prototype.name behaviour, where in Person case will be "Person" instead of an empty string</description>
		<content:encoded><![CDATA[<p>I wrote a couple of articles about all these questions, with solutions for emulated protected methods and problem explanation for shared in scope private variables (already linked in another Robert post)</p>
<p>Anyway, as Robert said, for the private variable usable via instance we need privileged methods, specially since Mozilla removed the second argument from eval function <img src='http://www.robertnyman.com/wp-includes/images/smilies/icon_razz.gif' alt=':P' class='wp-smiley' /> </p>
<p>Finally, with a dedicated closure it is possible to define prototypes that use private methods, always in that scope, so privileged method are usually not necessary at all <img src='http://www.robertnyman.com/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' /> </p>
<p><code><br />
function Person(name){<br />
	this.name = name;<br />
};</p>
<p>(function(){</p>
<p>	// shared private method<br />
	function _getName(){<br />
		return "My name is " + this.name;<br />
	};</p>
<p>	Person.prototype.getName = function(){<br />
		return _getName.call(this);<br />
	};<br />
})();<br />
</code><br />
Of course the constructor could be inside the closure as well, something like:<br />
<code><br />
Person = (function(){ // closure for everything<br />
	function Person(){};<br />
	Person.prototype.dostuff = function(){ ... };<br />
	return Person;<br />
})();<br />
</code><br />
just to preserve the Function.prototype.name behaviour, where in Person case will be &#8220;Person&#8221; instead of an empty string</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Robert Nyman</title>
		<link>http://www.robertnyman.com/2008/10/14/javascript-how-to-get-private-privileged-public-and-static-members-properties-and-methods/#comment-462223</link>
		<dc:creator>Robert Nyman</dc:creator>
		<pubDate>Tue, 14 Oct 2008 20:58:38 +0000</pubDate>
		<guid isPermaLink="false">http://www.robertnyman.com/?p=888#comment-462223</guid>
		<description>Andrew,

Thank you! :-)
It's a very good question, and something I've pondered too. Most of the time, I don't even use prototypical inheritance, but instead work with the &lt;a href="http://yuiblog.com/blog/2007/06/12/module-pattern/" rel="nofollow"&gt;Yahoo JavaScript Module Pattern&lt;/a&gt; and good namespacing.

But, while typing this at least, if you go the prototype route (which you should, if you need proper inheritance), you need to use privileged or public methods in the constructor to achieve this.</description>
		<content:encoded><![CDATA[<p>Andrew,</p>
<p>Thank you! <img src='http://www.robertnyman.com/wp-includes/images/smilies/icon_smile.gif' alt=':-)' class='wp-smiley' /><br />
It&#8217;s a very good question, and something I&#8217;ve pondered too. Most of the time, I don&#8217;t even use prototypical inheritance, but instead work with the <a href="http://yuiblog.com/blog/2007/06/12/module-pattern/" rel="nofollow">Yahoo JavaScript Module Pattern</a> and good namespacing.</p>
<p>But, while typing this at least, if you go the prototype route (which you should, if you need proper inheritance), you need to use privileged or public methods in the constructor to achieve this.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Andrew Noyes</title>
		<link>http://www.robertnyman.com/2008/10/14/javascript-how-to-get-private-privileged-public-and-static-members-properties-and-methods/#comment-462123</link>
		<dc:creator>Andrew Noyes</dc:creator>
		<pubDate>Tue, 14 Oct 2008 19:26:13 +0000</pubDate>
		<guid isPermaLink="false">http://www.robertnyman.com/?p=888#comment-462123</guid>
		<description>Another in a fantastic line of JavaScript articles!

I have a question: is there a way of having private members that are accesible by public functions created as a prototype? In C++, which is the language I learned Object Orientation in, anything that didn't need to be public was private. In JavaScript, if you use the prototype avenue, you're forced to make members public to allow for them to be accessed by public methods.

Let's say we have the following code:
&lt;code&gt;
function YourConstructor() {
var blah = 0;
}
&lt;/code&gt;
and the following method:
&lt;code&gt;
YourConstructor.prototype.getSomething = function () {
return blah;
}
&lt;/code&gt;
Obviously, instantiating the class as an object and then calling &lt;code&gt;getSomething()&lt;/code&gt; isn't going to work. Because of this, I find myself making members public that don't need to be, and that doesn't make a ton of sense from the perspective of OOP. Obviously we have the advantage of a dynamic scope via the &lt;code&gt;this&lt;/code&gt; keyword, but other than that, Class methods are really no more effective than regular functions that simply sift through public object members. Am I doing something wrong?</description>
		<content:encoded><![CDATA[<p>Another in a fantastic line of JavaScript articles!</p>
<p>I have a question: is there a way of having private members that are accesible by public functions created as a prototype? In C++, which is the language I learned Object Orientation in, anything that didn&#8217;t need to be public was private. In JavaScript, if you use the prototype avenue, you&#8217;re forced to make members public to allow for them to be accessed by public methods.</p>
<p>Let&#8217;s say we have the following code:<br />
<code><br />
function YourConstructor() {<br />
var blah = 0;<br />
}<br />
</code><br />
and the following method:<br />
<code><br />
YourConstructor.prototype.getSomething = function () {<br />
return blah;<br />
}<br />
</code><br />
Obviously, instantiating the class as an object and then calling <code>getSomething()</code> isn&#8217;t going to work. Because of this, I find myself making members public that don&#8217;t need to be, and that doesn&#8217;t make a ton of sense from the perspective of OOP. Obviously we have the advantage of a dynamic scope via the <code>this</code> keyword, but other than that, Class methods are really no more effective than regular functions that simply sift through public object members. Am I doing something wrong?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Robert Nyman</title>
		<link>http://www.robertnyman.com/2008/10/14/javascript-how-to-get-private-privileged-public-and-static-members-properties-and-methods/#comment-462026</link>
		<dc:creator>Robert Nyman</dc:creator>
		<pubDate>Tue, 14 Oct 2008 17:56:52 +0000</pubDate>
		<guid isPermaLink="false">http://www.robertnyman.com/?p=888#comment-462026</guid>
		<description>Andreas,

Thank you!
And you're absolutely right, and it's what Andrea pointed out as well. My public method code here was more for clarity than best practice, so I've updated the article with a correction about using &lt;code&gt;prototype&lt;/code&gt;.

Glad that you like the JavaScript articles! With the inheritance and the scope and closures articles, together with this one, I think there won't be too many in the near future, but one never knows. :-)

It all comes down to inspiration and what lines of thoughts I meet daily.</description>
		<content:encoded><![CDATA[<p>Andreas,</p>
<p>Thank you!<br />
And you&#8217;re absolutely right, and it&#8217;s what Andrea pointed out as well. My public method code here was more for clarity than best practice, so I&#8217;ve updated the article with a correction about using <code>prototype</code>.</p>
<p>Glad that you like the JavaScript articles! With the inheritance and the scope and closures articles, together with this one, I think there won&#8217;t be too many in the near future, but one never knows. <img src='http://www.robertnyman.com/wp-includes/images/smilies/icon_smile.gif' alt=':-)' class='wp-smiley' /> </p>
<p>It all comes down to inspiration and what lines of thoughts I meet daily.</p>
]]></content:encoded>
	</item>
</channel>
</rss>
