<?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"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
		>
<channel>
	<title>Comments on: “Too many ‘self’ in python.That’s a big flaw in this language.”</title>
	<atom:link href="http://jessenoller.com/2007/06/28/too-many-self-in-pythonthats-a-big-flaw-in-this-language/feed/" rel="self" type="application/rss+xml" />
	<link>http://jessenoller.com/2007/06/28/too-many-self-in-pythonthats-a-big-flaw-in-this-language/</link>
	<description>python, programming and other things</description>
	<lastBuildDate>Sun, 04 Mar 2012 06:06:00 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
		<item>
		<title>By: rgz</title>
		<link>http://jessenoller.com/2007/06/28/too-many-self-in-pythonthats-a-big-flaw-in-this-language/comment-page-1/#comment-146</link>
		<dc:creator>rgz</dc:creator>
		<pubDate>Fri, 29 Jun 2007 14:44:07 +0000</pubDate>
		<guid isPermaLink="false">http://jessenoller.com/2007/06/28/too-many-self-in-pythonthats-a-big-flaw-in-this-language/#comment-146</guid>
		<description>Explicit self is good specially if you make it a point of naming your member fields consistently. I code in VB.NET by day, and I always find that I want to use the same name as:
    
private field
public property
method parameter
class name

On top of that VB.NET is case insensitive, I always end up with a syntax like

private _field # carried over from Python! i did&#039;t knew of the m_ convention when I started in VB.NET
public Property # looks matter in API design    
method(pParameter) # So method parameters don&#039;t shadow properties, f*ck implicit self!
uClassName # *u*ser class, maybe it is too ugly

VB.NET allows using &quot;Me&quot; (like C++&#039;s &quot;this&quot;)  when there is ambiguity, so I can say Me.Property,. That could let me drop the u from the class name and use the same convention for fileds and parameters, that way i can say:

Me._field
Me.Property
method(_parameter)
ClassName

But in practice is easy to forget the &quot;Me.&quot; because the compiler doesn&#039;t enforce it  and I haven&#039;t found a way to make it complain when there is shadowing or ambiguity in local names. I wish VB.NET enforced &quot;Me.&quot;

On the other hand while I like explicit self and I like &quot;self&quot; better than &quot;Me&quot; or &quot;this&quot;, i wish self was a keyword, with similar semantics than javascrip&#039;s &quot;this&quot;, that is, to refer to the outter namespace, wouldn&#039;t that be sweet?</description>
		<content:encoded><![CDATA[<p>Explicit self is good specially if you make it a point of naming your member fields consistently. I code in VB.NET by day, and I always find that I want to use the same name as:</p>
<p>private field<br />
public property<br />
method parameter<br />
class name</p>
<p>On top of that VB.NET is case insensitive, I always end up with a syntax like</p>
<p>private _field # carried over from Python! i did’t knew of the m_ convention when I started in VB.NET<br />
public Property # looks matter in API design<br />
method(pParameter) # So method parameters don’t shadow properties, f*ck implicit self!<br />
uClassName # *u*ser class, maybe it is too ugly</p>
<p>VB.NET allows using “Me” (like C++‘s “this”)  when there is ambiguity, so I can say Me.Property,. That could let me drop the u from the class name and use the same convention for fileds and parameters, that way i can say:</p>
<p>Me._field<br />
Me.Property<br />
method(_parameter)<br />
ClassName</p>
<p>But in practice is easy to forget the “Me.” because the compiler doesn’t enforce it  and I haven’t found a way to make it complain when there is shadowing or ambiguity in local names. I wish VB.NET enforced “Me.”</p>
<p>On the other hand while I like explicit self and I like “self” better than “Me” or “this”, i wish self was a keyword, with similar semantics than javascrip’s “this”, that is, to refer to the outter namespace, wouldn’t that be sweet?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Virgil Dupras</title>
		<link>http://jessenoller.com/2007/06/28/too-many-self-in-pythonthats-a-big-flaw-in-this-language/comment-page-1/#comment-145</link>
		<dc:creator>Virgil Dupras</dc:creator>
		<pubDate>Fri, 29 Jun 2007 10:30:02 +0000</pubDate>
		<guid isPermaLink="false">http://jessenoller.com/2007/06/28/too-many-self-in-pythonthats-a-big-flaw-in-this-language/#comment-145</guid>
		<description>When I started python, I was coming from object pascal. I disliked self a lot. In object pascal, I liked using the &quot;with&quot; statement (no, it&#039;s not like the current &quot;with&quot; in python).

Today, you&#039;d have to pry explicit self from my cold dead hands :)

This guy only need to time to embrace python and stop trying to emulate his old language behavior in python.</description>
		<content:encoded><![CDATA[<p>When I started python, I was coming from object pascal. I disliked self a lot. In object pascal, I liked using the “with” statement (no, it’s not like the current “with” in python).</p>
<p>Today, you’d have to pry explicit self from my cold dead hands :)</p>
<p>This guy only need to time to embrace python and stop trying to emulate his old language behavior in python.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: andy</title>
		<link>http://jessenoller.com/2007/06/28/too-many-self-in-pythonthats-a-big-flaw-in-this-language/comment-page-1/#comment-143</link>
		<dc:creator>andy</dc:creator>
		<pubDate>Fri, 29 Jun 2007 07:11:57 +0000</pubDate>
		<guid isPermaLink="false">http://jessenoller.com/2007/06/28/too-many-self-in-pythonthats-a-big-flaw-in-this-language/#comment-143</guid>
		<description>I don&#039;t really like &quot;self&quot; (too much typing) so instead of &quot;self&quot; I just write &quot;m&quot;. That way, member values look like &quot;m.value&quot;, which is a lot like the m_value notation that people use in other languages.</description>
		<content:encoded><![CDATA[<p>I don’t really like “self” (too much typing) so instead of “self” I just write “m”. That way, member values look like “m.value”, which is a lot like the m_value notation that people use in other languages.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: dado1945</title>
		<link>http://jessenoller.com/2007/06/28/too-many-self-in-pythonthats-a-big-flaw-in-this-language/comment-page-1/#comment-142</link>
		<dc:creator>dado1945</dc:creator>
		<pubDate>Fri, 29 Jun 2007 05:03:15 +0000</pubDate>
		<guid isPermaLink="false">http://jessenoller.com/2007/06/28/too-many-self-in-pythonthats-a-big-flaw-in-this-language/#comment-142</guid>
		<description>I agree with you completely. &quot;Self&quot; is almost no different from &quot;m_&quot; ;)</description>
		<content:encoded><![CDATA[<p>I agree with you completely. “Self” is almost no different from “m_” ;)</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Mike Pirnat</title>
		<link>http://jessenoller.com/2007/06/28/too-many-self-in-pythonthats-a-big-flaw-in-this-language/comment-page-1/#comment-141</link>
		<dc:creator>Mike Pirnat</dc:creator>
		<pubDate>Fri, 29 Jun 2007 02:51:07 +0000</pubDate>
		<guid isPermaLink="false">http://jessenoller.com/2007/06/28/too-many-self-in-pythonthats-a-big-flaw-in-this-language/#comment-141</guid>
		<description>I&#039;ve really come to love the explicit self, to the point that languages that don&#039;t have it just feel creepy and wrong to me.  Maybe that means I&#039;ve been focused on Python for too long?  Or maybe it means that Python is the best fit for me that I&#039;ve found so far.</description>
		<content:encoded><![CDATA[<p>I’ve really come to love the explicit self, to the point that languages that don’t have it just feel creepy and wrong to me.  Maybe that means I’ve been focused on Python for too long?  Or maybe it means that Python is the best fit for me that I’ve found so far.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Doug Napoleone</title>
		<link>http://jessenoller.com/2007/06/28/too-many-self-in-pythonthats-a-big-flaw-in-this-language/comment-page-1/#comment-139</link>
		<dc:creator>Doug Napoleone</dc:creator>
		<pubDate>Fri, 29 Jun 2007 02:25:32 +0000</pubDate>
		<guid isPermaLink="false">http://jessenoller.com/2007/06/28/too-many-self-in-pythonthats-a-big-flaw-in-this-language/#comment-139</guid>
		<description>I agree. There was a great post on the mailing list at one point I think called &#039;When self is not self&#039; which dived into all these corner cases which would melt your mind if you didn&#039;t have self. can&#039;t find it right now for some reason. (Dealt with yield, generator classes, descriptors, properties, properties on meta classes, etc).</description>
		<content:encoded><![CDATA[<p>I agree. There was a great post on the mailing list at one point I think called ‘When self is not self’ which dived into all these corner cases which would melt your mind if you didn’t have self. can’t find it right now for some reason. (Dealt with yield, generator classes, descriptors, properties, properties on meta classes, etc).</p>
]]></content:encoded>
	</item>
</channel>
</rss>

<!-- Performance optimized by W3 Total Cache. Learn more: http://www.w3-edge.com/wordpress-plugins/

Minified using disk: basic
Page Caching using disk: enhanced
Object Caching 672/674 objects using disk: basic

Served from: jessenoller.com @ 2012-05-17 06:06:14 -->
