<?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: Sub Method</title> <atom:link href="http://voidreturn.com/index.php/2009/05/11/sub-method/feed/" rel="self" type="application/rss+xml" /><link>http://voidreturn.com/index.php/2009/05/11/sub-method/</link> <description>We define only out of despair, we must have a formula... to give a facade to the void.</description> <lastBuildDate>Sun, 02 May 2010 15:07:00 +0000</lastBuildDate> <sy:updatePeriod>hourly</sy:updatePeriod> <sy:updateFrequency>1</sy:updateFrequency> <item><title>By: Moritz Lenz (Perl 6): Subroutines vs. Methods - Differences and Commonalities &#124; rapid-DEV.net</title><link>http://voidreturn.com/index.php/2009/05/11/sub-method/comment-page-1/#comment-14125</link> <dc:creator>Moritz Lenz (Perl 6): Subroutines vs. Methods - Differences and Commonalities &#124; rapid-DEV.net</dc:creator> <pubDate>Mon, 15 Jun 2009 10:59:44 +0000</pubDate> <guid isPermaLink="false">http://voidreturn.com/?p=759#comment-14125</guid> <description>[...] is mostly a response to s1n&#8217;s post about subs and methods in Perl 6. He maintains that since methods are very common in classes, a sub declaration inside a class [...]</description> <content:encoded><![CDATA[<p>[...] is mostly a response to s1n&#8217;s post about subs and methods in Perl 6. He maintains that since methods are very common in classes, a sub declaration inside a class [...]</p> ]]></content:encoded> </item> <item><title>By: s1n</title><link>http://voidreturn.com/index.php/2009/05/11/sub-method/comment-page-1/#comment-13743</link> <dc:creator>s1n</dc:creator> <pubDate>Sat, 16 May 2009 04:03:37 +0000</pubDate> <guid isPermaLink="false">http://voidreturn.com/?p=759#comment-13743</guid> <description>SF: It depends. I usually try to import as few symbols as possible into my namespace to avoid cluttering it. I haven&#039;t run into any issues by doing that.That&#039;s not to say other people may or may not do it.</description> <content:encoded><![CDATA[<p>SF: It depends. I usually try to import as few symbols as possible into my namespace to avoid cluttering it. I haven&#8217;t run into any issues by doing that.</p><p>That&#8217;s not to say other people may or may not do it.</p> ]]></content:encoded> </item> <item><title>By: SF</title><link>http://voidreturn.com/index.php/2009/05/11/sub-method/comment-page-1/#comment-13738</link> <dc:creator>SF</dc:creator> <pubDate>Fri, 15 May 2009 21:34:02 +0000</pubDate> <guid isPermaLink="false">http://voidreturn.com/?p=759#comment-13738</guid> <description>I was under the impression that received wisdom in C++ was now to prepend &quot;this-&gt;&quot; to all references to members of a class.  The language doesn&#039;t require it, but it helps clarify intent.  I&#039;ve been doing it for member function calls in my code for years...</description> <content:encoded><![CDATA[<p>I was under the impression that received wisdom in C++ was now to prepend &#8220;this-&gt;&#8221; to all references to members of a class.  The language doesn&#8217;t require it, but it helps clarify intent.  I&#8217;ve been doing it for member function calls in my code for years&#8230;</p> ]]></content:encoded> </item> <item><title>By: David Garamond</title><link>http://voidreturn.com/index.php/2009/05/11/sub-method/comment-page-1/#comment-13725</link> <dc:creator>David Garamond</dc:creator> <pubDate>Thu, 14 May 2009 19:32:33 +0000</pubDate> <guid isPermaLink="false">http://voidreturn.com/?p=759#comment-13725</guid> <description>And what if I *really* want a sub and not a method?Maybe Perl 5-&gt;6 code translator most probably need to automatically convert some &quot;sub&quot;&#039;s to &quot;method&quot;, but I tend to think that Perl 5 coders should get used to write &quot;method&quot;.</description> <content:encoded><![CDATA[<p>And what if I *really* want a sub and not a method?</p><p>Maybe Perl 5-&gt;6 code translator most probably need to automatically convert some &#8220;sub&#8221;&#8216;s to &#8220;method&#8221;, but I tend to think that Perl 5 coders should get used to write &#8220;method&#8221;.</p> ]]></content:encoded> </item> <item><title>By: s1n</title><link>http://voidreturn.com/index.php/2009/05/11/sub-method/comment-page-1/#comment-13700</link> <dc:creator>s1n</dc:creator> <pubDate>Wed, 13 May 2009 10:04:10 +0000</pubDate> <guid isPermaLink="false">http://voidreturn.com/?p=759#comment-13700</guid> <description>&gt;If the invocant is to be assumed, then the above would &gt;call Foo’s open. But then how do I call perl’s open?After today&#039;s p6m meeting, pmichaud explained in a better fashion how the sub/method thing works and it&#039;s clearer to me. Having said that, you could always call a sub via it&#039;s namespace, which would be IO::open() in this case.I fully intend on following this up tomorrow (it&#039;s rather late).</description> <content:encoded><![CDATA[<p>>If the invocant is to be assumed, then the above would<br /> >call Foo’s open. But then how do I call perl’s open?</p><p>After today&#8217;s p6m meeting, pmichaud explained in a better fashion how the sub/method thing works and it&#8217;s clearer to me. Having said that, you could always call a sub via it&#8217;s namespace, which would be IO::open() in this case.</p><p>I fully intend on following this up tomorrow (it&#8217;s rather late).</p> ]]></content:encoded> </item> <item><title>By: ben</title><link>http://voidreturn.com/index.php/2009/05/11/sub-method/comment-page-1/#comment-13691</link> <dc:creator>ben</dc:creator> <pubDate>Wed, 13 May 2009 02:51:38 +0000</pubDate> <guid isPermaLink="false">http://voidreturn.com/?p=759#comment-13691</guid> <description>&gt; Basically, I made several mistakes in trying to call my class functions “sub” when &gt; I meant method. Perl6 happily lets me shoot myself in the foot and then &gt; complains when I try calling the sub against an objectThat&#039;s a fair complaint, but it also highlights the original problem with perl 5&#039;s reusing of subs as methods: you can&#039;t tell that a sub is a sub and not a method.Maybe the compiler could check for the use of an invocant in a sub in a class and issue a warning; that would help perl 5 users migrate.</description> <content:encoded><![CDATA[<p>&gt; Basically, I made several mistakes in trying to call my class functions “sub” when<br /> &gt; I meant method. Perl6 happily lets me shoot myself in the foot and then<br /> &gt; complains when I try calling the sub against an object</p><p>That&#8217;s a fair complaint, but it also highlights the original problem with perl 5&#8242;s reusing of subs as methods: you can&#8217;t tell that a sub is a sub and not a method.</p><p>Maybe the compiler could check for the use of an invocant in a sub in a class and issue a warning; that would help perl 5 users migrate.</p> ]]></content:encoded> </item> <item><title>By: PerlPilot</title><link>http://voidreturn.com/index.php/2009/05/11/sub-method/comment-page-1/#comment-13689</link> <dc:creator>PerlPilot</dc:creator> <pubDate>Tue, 12 May 2009 23:33:43 +0000</pubDate> <guid isPermaLink="false">http://voidreturn.com/?p=759#comment-13689</guid> <description>&gt; The point of the second example was to illustrate how &gt; annoying it was to constantly have to specify the invocant. &gt; After years of not doing that, it just seems logical that it &gt; would be implied within the class.That&#039;s clearly crazy.class Foo { method open (...) { ... } method bar { open(...);   } }If the invocant is to be assumed, then the above would call Foo&#039;s open.  But then how do I call perl&#039;s open?I would guess the answer to be related to your comment about &quot;placing the object model above all else&quot;.   One of Perl&#039;s defining characteristics is to *NOT* slavish follow dogmatic principles because what&#039;s important are the _programmer&#039;s_ opinions about how problems should be solved, rather than the language designer&#039;s. So, while the object model is important, it&#039;s not important enough to be the lens through which all problems are viewed.</description> <content:encoded><![CDATA[<p>&gt; The point of the second example was to illustrate how<br /> &gt; annoying it was to constantly have to specify the invocant.<br /> &gt; After years of not doing that, it just seems logical that it<br /> &gt; would be implied within the class.</p><p>That&#8217;s clearly crazy.</p><p> class Foo {<br /> method open (&#8230;) { &#8230; }<br /> method bar { open(&#8230;);   }<br /> }</p><p>If the invocant is to be assumed, then the above would call Foo&#8217;s open.  But then how do I call perl&#8217;s open?</p><p>I would guess the answer to be related to your comment about &#8220;placing the object model above all else&#8221;.   One of Perl&#8217;s defining characteristics is to *NOT* slavish follow dogmatic principles because what&#8217;s important are the _programmer&#8217;s_ opinions about how problems should be solved, rather than the language designer&#8217;s. So, while the object model is important, it&#8217;s not important enough to be the lens through which all problems are viewed.</p> ]]></content:encoded> </item> <item><title>By: s1n</title><link>http://voidreturn.com/index.php/2009/05/11/sub-method/comment-page-1/#comment-13676</link> <dc:creator>s1n</dc:creator> <pubDate>Tue, 12 May 2009 07:48:39 +0000</pubDate> <guid isPermaLink="false">http://voidreturn.com/?p=759#comment-13676</guid> <description>Wow, three comments! I didn&#039;t know I had any readers! Let me try to respond to you guys now.chromatic:I have a hard time believing that this would be too ambiguous in perl5. I don&#039;t have the extensive perl5 CPAN publishing experience you do, though I have been doing my $DAYJOB in C/C++ mostly.I agree that different things should look different. My argument was that sub, method, and submethod wen&#039;t different enough. That is why I recommended a method modifier, similar to how C/C++/Java does it.Lastly, my comment is based solely as a response to jnth&#039;s comment about the preference of method dispatch over a little bit of OO clunkiness.Moritz:I actually like Perl6; I&#039;m not griping or wining but hopefully trying to improve things for everyone. And yes, I fully intend on extending the STD grammar when macros are available.fREW:The point of the second example was to illustrate how annoying it was to constantly have to specify the invocant. After years of not doing that, it just seems logical that it would be implied within the class.</description> <content:encoded><![CDATA[<p>Wow, three comments! I didn&#8217;t know I had any readers! Let me try to respond to you guys now.</p><p>chromatic:</p><p>I have a hard time believing that this would be too ambiguous in perl5. I don&#8217;t have the extensive perl5 CPAN publishing experience you do, though I have been doing my $DAYJOB in C/C++ mostly.</p><p>I agree that different things should look different. My argument was that sub, method, and submethod wen&#8217;t different enough. That is why I recommended a method modifier, similar to how C/C++/Java does it.</p><p>Lastly, my comment is based solely as a response to jnth&#8217;s comment about the preference of method dispatch over a little bit of OO clunkiness.</p><p>Moritz:</p><p>I actually like Perl6; I&#8217;m not griping or wining but hopefully trying to improve things for everyone. And yes, I fully intend on extending the STD grammar when macros are available.</p><p>fREW:</p><p>The point of the second example was to illustrate how annoying it was to constantly have to specify the invocant. After years of not doing that, it just seems logical that it would be implied within the class.</p> ]]></content:encoded> </item> <item><title>By: fREW</title><link>http://voidreturn.com/index.php/2009/05/11/sub-method/comment-page-1/#comment-13664</link> <dc:creator>fREW</dc:creator> <pubDate>Mon, 11 May 2009 16:04:49 +0000</pubDate> <guid isPermaLink="false">http://voidreturn.com/?p=759#comment-13664</guid> <description>I think it&#039;s fine since (I&#039;m pretty sure) you can just do this:class A { method foo { say &quot;nope&quot; }; method bar { self.foo() } }</description> <content:encoded><![CDATA[<p>I think it&#8217;s fine since (I&#8217;m pretty sure) you can just do this:</p><p>class A {<br /> method foo {<br /> say &#8220;nope&#8221;<br /> };<br /> method bar {<br /> self.foo()<br /> }<br /> }</p> ]]></content:encoded> </item> <item><title>By: Moritz</title><link>http://voidreturn.com/index.php/2009/05/11/sub-method/comment-page-1/#comment-13662</link> <dc:creator>Moritz</dc:creator> <pubDate>Mon, 11 May 2009 12:55:38 +0000</pubDate> <guid isPermaLink="false">http://voidreturn.com/?p=759#comment-13662</guid> <description>To quote&gt; The “many paradigms” argument is wrong because the &gt; language should do one thing and do it well.&quot;Sorry, Perl 6 is not the right language for you if that&#039;s your opinion on language design. Perl always was a multi paradigm language, and will always be.(If you want a really nice object system (without meta object programming, though) Eiffel would be a good choice.)That said, I think that it&#039;s very perlish to add new keywords and/or syntax for important features, so having a separate &#039;method&#039; keyword is actually a sign that we take OO very seriously.</description> <content:encoded><![CDATA[<p>To quote</p><p>&gt; The “many paradigms” argument is wrong because the<br /> &gt; language should do one thing and do it well.&#8221;</p><p>Sorry, Perl 6 is not the right language for you if that&#8217;s your opinion on language design. Perl always was a multi paradigm language, and will always be.</p><p>(If you want a really nice object system (without meta object programming, though) Eiffel would be a good choice.)</p><p>That said, I think that it&#8217;s very perlish to add new keywords and/or syntax for important features, so having a separate &#8216;method&#8217; keyword is actually a sign that we take OO very seriously.</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: basic (Requested URI is rejected)
Database Caching 5/18 queries in 0.012 seconds using disk: basic

Served from: voidreturn.com @ 2012-05-22 00:20:17 -->
