I may have just missed the point to your attempt to derail this conversation =P<br><br>However.. <br><br>Why do all that when you can just <br><br>str = &quot;Hello World&quot;<br>print str * 2<br><br>(Maybe I missed some concept that this small example doesn't accuratly reflect)
<br><br><div><span class="gmail_quote">On 11/6/06, <b class="gmail_sendername">Danny Yoo</b> &lt;<a href="mailto:dyoo@hkn.eecs.berkeley.edu">dyoo@hkn.eecs.berkeley.edu</a>&gt; wrote:</span><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
<br>&gt; Wow... I had to click this e-mail just because I saw the first posts on the<br>&gt; mentioned thread and could see it turning for the worst..<br><br>Hi everyone,<br><br>So let's try to squash this one now.&nbsp;&nbsp;There are more interesting problems
<br>to solve.&nbsp;&nbsp;Or other flame wars to fight.<br><br><br>Let me see if we can do something constructive.&nbsp;&nbsp;I've been doing a<br>shallow, superficial study of the Ruby language at the moment.&nbsp;&nbsp;One of the<br>things I've been impressed about is that they've managed to make lambdas
<br>look non-threatening to people with their syntactic sugar of &quot;code<br>blocks&quot;.<br><br>For example,<br><br>## Ruby #####################<br>def twice<br>&nbsp;&nbsp;&nbsp;&nbsp; yield<br>&nbsp;&nbsp;&nbsp;&nbsp; yield<br>twice { puts &quot;hello world&quot; }
<br>#############################<br><br>This prints out &quot;hello world&quot; twice in a row: the twice() function takes<br>in an implicit &quot;code block&quot;, which it can later call by using their<br>'yield' statement.&nbsp;&nbsp;What the Ruby folks are doing is trying to make the
<br>use of higher-order procedures look really simple.&nbsp;&nbsp;In fact, most of the<br>encouraged idiom style I've seen so far extensively uses this code style<br>pervasively (especially for iteration), and that's very admirable.
<br><br><br>The exact functionality can be done in Python, but it does look a little<br>more intimidating at first:<br><br>&nbsp;&nbsp;&nbsp;&nbsp; ## Python<br>&nbsp;&nbsp;&nbsp;&nbsp; def twice(f):<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; f()<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; f()<br>&nbsp;&nbsp;&nbsp;&nbsp; twice(lambda: sys.stdout.write
(&quot;hello world\n&quot;))<br><br>This does the same thing, but it looks a little scarier because the<br>concepts needed to grasp his are superficially harder than that in the<br>Ruby code.<br><br><br>Anyway, let's derail off this regex flamewar and get us back to talking
<br>about code and about stuff that actually matters, like learning how to use<br>functions well.. *wink*<br></blockquote></div><br>