<?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/"
	xmlns:georss="http://www.georss.org/georss" xmlns:geo="http://www.w3.org/2003/01/geo/wgs84_pos#" xmlns:media="http://search.yahoo.com/mrss/"
		>
<channel>
	<title>Comments on: Day 2 &#8211; Interacting with the command line with MAIN subs</title>
	<atom:link href="http://perl6advent.wordpress.com/2010/12/02/day-2-interacting-with-the-command-line-with-main-subs/feed/" rel="self" type="application/rss+xml" />
	<link>http://perl6advent.wordpress.com/2010/12/02/day-2-interacting-with-the-command-line-with-main-subs/</link>
	<description>Something cool about Perl 6 every day</description>
	<lastBuildDate>Sun, 03 Feb 2013 05:15:50 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.com/</generator>
	<item>
		<title>By: Zingus</title>
		<link>http://perl6advent.wordpress.com/2010/12/02/day-2-interacting-with-the-command-line-with-main-subs/#comment-417</link>
		<dc:creator><![CDATA[Zingus]]></dc:creator>
		<pubDate>Sun, 05 Dec 2010 04:49:54 +0000</pubDate>
		<guid isPermaLink="false">http://perl6advent.wordpress.com/?p=445#comment-417</guid>
		<description><![CDATA[This a really a remarkable feature, the first that makes me go &quot;wow that&#039;s good&quot; in years of lurking.

At first sight declaring a MAIN in perl seems _so damn wrong_, but given a good look it is _so damn right_ and it introduces first timers to all subroutine argument types fast.

Very good starting point for tutorials.

I now ask a minute of silence over Getopt::Long.

It served us well, and until now it was the best command line parser I had ever had the pleasure to work with, in any language.]]></description>
		<content:encoded><![CDATA[<p>This a really a remarkable feature, the first that makes me go &#8220;wow that&#8217;s good&#8221; in years of lurking.</p>
<p>At first sight declaring a MAIN in perl seems _so damn wrong_, but given a good look it is _so damn right_ and it introduces first timers to all subroutine argument types fast.</p>
<p>Very good starting point for tutorials.</p>
<p>I now ask a minute of silence over Getopt::Long.</p>
<p>It served us well, and until now it was the best command line parser I had ever had the pleasure to work with, in any language.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Moritz</title>
		<link>http://perl6advent.wordpress.com/2010/12/02/day-2-interacting-with-the-command-line-with-main-subs/#comment-396</link>
		<dc:creator><![CDATA[Moritz]]></dc:creator>
		<pubDate>Fri, 03 Dec 2010 08:50:12 +0000</pubDate>
		<guid isPermaLink="false">http://perl6advent.wordpress.com/?p=445#comment-396</guid>
		<description><![CDATA[Currently the type of all arguments (except those that match parameters declared as Bool) are Str, so declaring a sub MAIN with an Int parameter will never do what you mean.

We know this is not ideal, and are looking for alternative mechanisms. Maybe some smarter type detection for literals would be desirable.]]></description>
		<content:encoded><![CDATA[<p>Currently the type of all arguments (except those that match parameters declared as Bool) are Str, so declaring a sub MAIN with an Int parameter will never do what you mean.</p>
<p>We know this is not ideal, and are looking for alternative mechanisms. Maybe some smarter type detection for literals would be desirable.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Markus Mayr</title>
		<link>http://perl6advent.wordpress.com/2010/12/02/day-2-interacting-with-the-command-line-with-main-subs/#comment-394</link>
		<dc:creator><![CDATA[Markus Mayr]]></dc:creator>
		<pubDate>Fri, 03 Dec 2010 08:15:54 +0000</pubDate>
		<guid isPermaLink="false">http://perl6advent.wordpress.com/?p=445#comment-394</guid>
		<description><![CDATA[I have a few questions regarding this feature.

For example, does
sub MAIN(Num $x, Num $y)
provide you with a different usage message?

Is it possible to distinguish certain alternatives just by using their types? For example will
multi MAIN(Str $type, Num $x, Num $y)
multi MAIN(Num $x, Num $y, Num $z)
work as expected?

And what about arrays? Does
multi MAIN(Num @x)
{
  say [+] @x;
}
work as expected?

I really like this feature of Perl6, I just also would like to know about its limitations.]]></description>
		<content:encoded><![CDATA[<p>I have a few questions regarding this feature.</p>
<p>For example, does<br />
sub MAIN(Num $x, Num $y)<br />
provide you with a different usage message?</p>
<p>Is it possible to distinguish certain alternatives just by using their types? For example will<br />
multi MAIN(Str $type, Num $x, Num $y)<br />
multi MAIN(Num $x, Num $y, Num $z)<br />
work as expected?</p>
<p>And what about arrays? Does<br />
multi MAIN(Num @x)<br />
{<br />
  say [+] @x;<br />
}<br />
work as expected?</p>
<p>I really like this feature of Perl6, I just also would like to know about its limitations.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Mika</title>
		<link>http://perl6advent.wordpress.com/2010/12/02/day-2-interacting-with-the-command-line-with-main-subs/#comment-390</link>
		<dc:creator><![CDATA[Mika]]></dc:creator>
		<pubDate>Thu, 02 Dec 2010 19:45:55 +0000</pubDate>
		<guid isPermaLink="false">http://perl6advent.wordpress.com/?p=445#comment-390</guid>
		<description><![CDATA[multi MAIN(&#039;add&#039;, $x, $y)  { say $x + $y }
should probably give usage 
./calc &#039;add&#039; x y

If it gives just
./calc add x y
as in the example, &#039;add&#039; might be a variable name?]]></description>
		<content:encoded><![CDATA[<p>multi MAIN(&#8216;add&#8217;, $x, $y)  { say $x + $y }<br />
should probably give usage<br />
./calc &#8216;add&#8217; x y</p>
<p>If it gives just<br />
./calc add x y<br />
as in the example, &#8216;add&#8217; might be a variable name?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Eddward</title>
		<link>http://perl6advent.wordpress.com/2010/12/02/day-2-interacting-with-the-command-line-with-main-subs/#comment-388</link>
		<dc:creator><![CDATA[Eddward]]></dc:creator>
		<pubDate>Thu, 02 Dec 2010 15:18:19 +0000</pubDate>
		<guid isPermaLink="false">http://perl6advent.wordpress.com/?p=445#comment-388</guid>
		<description><![CDATA[This seems like such a little thing, but for me it&#039;s a killer feature.  I write tons of little scripts to automate away busywork.  Now it&#039;s development tools, it used to be sysadmin scripts.  I either end up not checking input or I have to constantly go back to perldoc and remind myself how to set up Getopt::Long.  This and the power of perl6&#039;s prototypes are going to make it a lot easier to whip out little tools by hiding a lot of boilerplate code.]]></description>
		<content:encoded><![CDATA[<p>This seems like such a little thing, but for me it&#8217;s a killer feature.  I write tons of little scripts to automate away busywork.  Now it&#8217;s development tools, it used to be sysadmin scripts.  I either end up not checking input or I have to constantly go back to perldoc and remind myself how to set up Getopt::Long.  This and the power of perl6&#8242;s prototypes are going to make it a lot easier to whip out little tools by hiding a lot of boilerplate code.</p>
]]></content:encoded>
	</item>
</channel>
</rss>
