<?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: On JS &#8220;Lambdas&#8221;</title>
	<atom:link href="http://infrequently.org/2009/05/on-js-lambdas/feed/" rel="self" type="application/rss+xml" />
	<link>http://infrequently.org/2009/05/on-js-lambdas/</link>
	<description></description>
	<lastBuildDate>Thu, 10 May 2012 17:22:05 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.2</generator>
	<item>
		<title>By: Alan Dipert</title>
		<link>http://infrequently.org/2009/05/on-js-lambdas/comment-page-1/#comment-236269</link>
		<dc:creator>Alan Dipert</dc:creator>
		<pubDate>Sun, 09 Aug 2009 18:04:24 +0000</pubDate>
		<guid isPermaLink="false">http://alex.dojotoolkit.org/?p=976#comment-236269</guid>
		<description>Why not something like Functional JS:

http://osteele.com/sources/javascript/functional/

Implicit parameters, implicit returns, and a lots of handy functions taking advantage of short lambdas.

It doesn&#039;t do any DOM-y stuff by itself, but I&#039;ve been using it along with Prototype for some pretty happy code.</description>
		<content:encoded><![CDATA[<p>Why not something like Functional JS:</p>
<p><a href="http://osteele.com/sources/javascript/functional/" rel="nofollow">http://osteele.com/sources/javascript/functional/</a></p>
<p>Implicit parameters, implicit returns, and a lots of handy functions taking advantage of short lambdas.</p>
<p>It doesn&#8217;t do any DOM-y stuff by itself, but I&#8217;ve been using it along with Prototype for some pretty happy code.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: George Huger</title>
		<link>http://infrequently.org/2009/05/on-js-lambdas/comment-page-1/#comment-236267</link>
		<dc:creator>George Huger</dc:creator>
		<pubDate>Sun, 09 Aug 2009 17:29:45 +0000</pubDate>
		<guid isPermaLink="false">http://alex.dojotoolkit.org/?p=976#comment-236267</guid>
		<description>I like where you&#039;re going with this, but I would vote against # as a symbol for function because its already used in so many other languages for &#039;comment&#039;.</description>
		<content:encoded><![CDATA[<p>I like where you&#8217;re going with this, but I would vote against # as a symbol for function because its already used in so many other languages for &#8216;comment&#8217;.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Continuing Intermittent Incoherency &#187; JS 1.8 Function Expressions: The Opposite of &#8220;Good&#8221;</title>
		<link>http://infrequently.org/2009/05/on-js-lambdas/comment-page-1/#comment-236247</link>
		<dc:creator>Continuing Intermittent Incoherency &#187; JS 1.8 Function Expressions: The Opposite of &#8220;Good&#8221;</dc:creator>
		<pubDate>Thu, 06 Aug 2009 21:02:57 +0000</pubDate>
		<guid isPermaLink="false">http://alex.dojotoolkit.org/?p=976#comment-236247</guid>
		<description>[...] is crying out for a way to write functions more tersely. I&#8217;ve added my suggestion to the debate, and was vaguely aware that Mozilla had implemented &#8220;function expressions&#8221;. It [...]</description>
		<content:encoded><![CDATA[<p>[...] is crying out for a way to write functions more tersely. I&#8217;ve added my suggestion to the debate, and was vaguely aware that Mozilla had implemented &#8220;function expressions&#8221;. It [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Eugene Lazutkin</title>
		<link>http://infrequently.org/2009/05/on-js-lambdas/comment-page-1/#comment-236051</link>
		<dc:creator>Eugene Lazutkin</dc:creator>
		<pubDate>Sat, 23 May 2009 23:35:25 +0000</pubDate>
		<guid isPermaLink="false">http://alex.dojotoolkit.org/?p=976#comment-236051</guid>
		<description>@Leo: Both &quot;GZip and text editor autocompletion features&quot; do not help with understanding of the code in question. If we are to turn the functional programming in JavaScript up a notch, we will see nothing but &quot;function&quot; words everywhere. Excessive bloat does make code less comprehensive. OTOH we should balance the act trying not to turn programs into obfuscated riddles. That&#039;s what Alex is talking about: no new rules, no new concepts, but more clarity by reducing unnecessary technicalities.</description>
		<content:encoded><![CDATA[<p>@Leo: Both &#8220;GZip and text editor autocompletion features&#8221; do not help with understanding of the code in question. If we are to turn the functional programming in JavaScript up a notch, we will see nothing but &#8220;function&#8221; words everywhere. Excessive bloat does make code less comprehensive. OTOH we should balance the act trying not to turn programs into obfuscated riddles. That&#8217;s what Alex is talking about: no new rules, no new concepts, but more clarity by reducing unnecessary technicalities.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: alex</title>
		<link>http://infrequently.org/2009/05/on-js-lambdas/comment-page-1/#comment-236044</link>
		<dc:creator>alex</dc:creator>
		<pubDate>Fri, 22 May 2009 23:42:37 +0000</pubDate>
		<guid isPermaLink="false">http://alex.dojotoolkit.org/?p=976#comment-236044</guid>
		<description>Leo:

They address size-on-the wire. They don&#039;t address human factors.

Trav:

I *wrote* one of those minifiers. You don&#039;t need to lecture me on the topic of what is and isn&#039;t effective in terms of reducing byte count ;-)

As for readability, it&#039;s a human-factors argument, and I&#039;m arguing that seeing the word &quot;function&quot; all over the place really isn&#039;t as clear as you think it is. Java tends to be difficult to comprehend for similar reasons...stuff gets munged into structures that don&#039;t fit the intent as a side-effect of insufficient semantics married to bad syntax. JS is better on the functional side of things (the semantics are fine), but the sytnax is lousy. I&#039;ll absolutely agree that a non-lame class composition system (traits, anyone?) would go a very long way to addressing some of the bigger issues in the language, but if the WG is going to chew of lambdas (and it looks like they are), we should propose something that doesn&#039;t suck.

We can absolutely make both sides of the language easier to use at the same time. There&#039;s no either/or here.

Regards</description>
		<content:encoded><![CDATA[<p>Leo:</p>
<p>They address size-on-the wire. They don&#8217;t address human factors.</p>
<p>Trav:</p>
<p>I *wrote* one of those minifiers. You don&#8217;t need to lecture me on the topic of what is and isn&#8217;t effective in terms of reducing byte count <img src='http://infrequently.org/wp-includes/images/smilies/icon_wink.gif' alt=';-)' class='wp-smiley' /> </p>
<p>As for readability, it&#8217;s a human-factors argument, and I&#8217;m arguing that seeing the word &#8220;function&#8221; all over the place really isn&#8217;t as clear as you think it is. Java tends to be difficult to comprehend for similar reasons&#8230;stuff gets munged into structures that don&#8217;t fit the intent as a side-effect of insufficient semantics married to bad syntax. JS is better on the functional side of things (the semantics are fine), but the sytnax is lousy. I&#8217;ll absolutely agree that a non-lame class composition system (traits, anyone?) would go a very long way to addressing some of the bigger issues in the language, but if the WG is going to chew of lambdas (and it looks like they are), we should propose something that doesn&#8217;t suck.</p>
<p>We can absolutely make both sides of the language easier to use at the same time. There&#8217;s no either/or here.</p>
<p>Regards</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Trav</title>
		<link>http://infrequently.org/2009/05/on-js-lambdas/comment-page-1/#comment-236040</link>
		<dc:creator>Trav</dc:creator>
		<pubDate>Fri, 22 May 2009 17:48:20 +0000</pubDate>
		<guid isPermaLink="false">http://alex.dojotoolkit.org/?p=976#comment-236040</guid>
		<description>What a mess. Less code is not easier to read. When a small amount of code contains the same functional logic as a large amount of code, the short code is *harder* to read.

All languages have compilers to optimize their performance. Javascript has minifiers. I can have a large amount of human-readable source code while still sending a minimal amount of code to the browser. Please don&#039;t make things more complicated than they should be.</description>
		<content:encoded><![CDATA[<p>What a mess. Less code is not easier to read. When a small amount of code contains the same functional logic as a large amount of code, the short code is *harder* to read.</p>
<p>All languages have compilers to optimize their performance. Javascript has minifiers. I can have a large amount of human-readable source code while still sending a minimal amount of code to the browser. Please don&#8217;t make things more complicated than they should be.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: C#3.0, LINQ / Expresiones Lambda, Silverlight &#124; Nessy</title>
		<link>http://infrequently.org/2009/05/on-js-lambdas/comment-page-1/#comment-236039</link>
		<dc:creator>C#3.0, LINQ / Expresiones Lambda, Silverlight &#124; Nessy</dc:creator>
		<pubDate>Fri, 22 May 2009 15:39:30 +0000</pubDate>
		<guid isPermaLink="false">http://alex.dojotoolkit.org/?p=976#comment-236039</guid>
		<description>[...] parece tener su Lambda: http://alex.dojotoolkit.org/2009/05/on-js-lambdas/.   Share and [...]</description>
		<content:encoded><![CDATA[<p>[...] parece tener su Lambda: <a href="http://alex.dojotoolkit.org/2009/05/on-js-lambdas/" rel="nofollow">http://alex.dojotoolkit.org/2009/05/on-js-lambdas/</a>.   Share and [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Leo</title>
		<link>http://infrequently.org/2009/05/on-js-lambdas/comment-page-1/#comment-236038</link>
		<dc:creator>Leo</dc:creator>
		<pubDate>Fri, 22 May 2009 15:24:05 +0000</pubDate>
		<guid isPermaLink="false">http://alex.dojotoolkit.org/?p=976#comment-236038</guid>
		<description>Don&#039;t GZip and text editor autocompletion features make this proposal moot?</description>
		<content:encoded><![CDATA[<p>Don&#8217;t GZip and text editor autocompletion features make this proposal moot?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Bertrand Le Roy</title>
		<link>http://infrequently.org/2009/05/on-js-lambdas/comment-page-1/#comment-236035</link>
		<dc:creator>Bertrand Le Roy</dc:creator>
		<pubDate>Fri, 22 May 2009 06:02:32 +0000</pubDate>
		<guid isPermaLink="false">http://alex.dojotoolkit.org/?p=976#comment-236035</guid>
		<description>If this ever makes it into EcmaScript, it would be great if it could avoid creating a new syntax and would instead adopt one that already exists in another &quot;curly brace&quot; language. I&#039;m partial to the C# syntax for Lambdas myself.</description>
		<content:encoded><![CDATA[<p>If this ever makes it into EcmaScript, it would be great if it could avoid creating a new syntax and would instead adopt one that already exists in another &#8220;curly brace&#8221; language. I&#8217;m partial to the C# syntax for Lambdas myself.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: alex</title>
		<link>http://infrequently.org/2009/05/on-js-lambdas/comment-page-1/#comment-236031</link>
		<dc:creator>alex</dc:creator>
		<pubDate>Thu, 21 May 2009 21:34:59 +0000</pubDate>
		<guid isPermaLink="false">http://alex.dojotoolkit.org/?p=976#comment-236031</guid>
		<description>Chris:

I posted something not dissimilar to the ES lists some time ago, but it&#039;s not clear to a native JS parser what the &lt;code&gt;{&#124;&lt;/code&gt; production should mean. As we were talking through it, Erik pointed out to me that the &lt;code&gt;{ ... }&lt;/code&gt; syntax (maddeningly) seems to be taken by a anonymous block syntax that many JS interpreters already support but which doesn&#039;t actually *DO* anything. Grr.

As a result, both of those syntaxes would involve lots of look-ahead, which some implementers are (apparently) loathe to contemplate.

Regards</description>
		<content:encoded><![CDATA[<p>Chris:</p>
<p>I posted something not dissimilar to the ES lists some time ago, but it&#8217;s not clear to a native JS parser what the <code>{|</code> production should mean. As we were talking through it, Erik pointed out to me that the <code>{ ... }</code> syntax (maddeningly) seems to be taken by a anonymous block syntax that many JS interpreters already support but which doesn&#8217;t actually *DO* anything. Grr.</p>
<p>As a result, both of those syntaxes would involve lots of look-ahead, which some implementers are (apparently) loathe to contemplate.</p>
<p>Regards</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Custom JavaScript with &#8220;parseScripts&#8221; - James Padolsey</title>
		<link>http://infrequently.org/2009/05/on-js-lambdas/comment-page-1/#comment-236030</link>
		<dc:creator>Custom JavaScript with &#8220;parseScripts&#8221; - James Padolsey</dc:creator>
		<pubDate>Thu, 21 May 2009 21:23:08 +0000</pubDate>
		<guid isPermaLink="false">http://alex.dojotoolkit.org/?p=976#comment-236030</guid>
		<description>[...] on your imagination. Just as an example, I&#8217;ve implemented Alex&#8217;s (from Dojo) recent Cramdas idea; usable in the following way: &lt;script type=&quot;application/javascript:cramdas&quot;&gt; var [...]</description>
		<content:encoded><![CDATA[<p>[...] on your imagination. Just as an example, I&#8217;ve implemented Alex&#8217;s (from Dojo) recent Cramdas idea; usable in the following way: &lt;script type=&quot;application/javascript:cramdas&quot;&gt; var [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: LOL</title>
		<link>http://infrequently.org/2009/05/on-js-lambdas/comment-page-1/#comment-236028</link>
		<dc:creator>LOL</dc:creator>
		<pubDate>Thu, 21 May 2009 19:54:37 +0000</pubDate>
		<guid isPermaLink="false">http://alex.dojotoolkit.org/?p=976#comment-236028</guid>
		<description>RIDICULOUS, get away from JavaScript thanks !</description>
		<content:encoded><![CDATA[<p>RIDICULOUS, get away from JavaScript thanks !</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Chris Butler</title>
		<link>http://infrequently.org/2009/05/on-js-lambdas/comment-page-1/#comment-236027</link>
		<dc:creator>Chris Butler</dc:creator>
		<pubDate>Thu, 21 May 2009 19:30:00 +0000</pubDate>
		<guid isPermaLink="false">http://alex.dojotoolkit.org/?p=976#comment-236027</guid>
		<description>I am a big fan of Ruby&#039;s block syntax. Just &quot; { ... } &quot; and if you want arguments &quot; {&#124;x,y&#124; x + y } &quot;. Very clean, and very readable. 

With that said, isnt there a javascript implementation of Ruby? HotRuby or something.</description>
		<content:encoded><![CDATA[<p>I am a big fan of Ruby&#8217;s block syntax. Just &#8221; { &#8230; } &#8221; and if you want arguments &#8221; {|x,y| x + y } &#8220;. Very clean, and very readable. </p>
<p>With that said, isnt there a javascript implementation of Ruby? HotRuby or something.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Shawn</title>
		<link>http://infrequently.org/2009/05/on-js-lambdas/comment-page-1/#comment-236026</link>
		<dc:creator>Shawn</dc:creator>
		<pubDate>Thu, 21 May 2009 17:53:47 +0000</pubDate>
		<guid isPermaLink="false">http://alex.dojotoolkit.org/?p=976#comment-236026</guid>
		<description>@Ian: I grabbed the most recent minified version of jQuery and did a simple:

sed -E -e &#039;s/\s*function\s*/#/g&#039; -e &#039;s/\s*return\s*//&#039;

...and got a savings of 4,220 bytes. So either the library grew an awful lot, or you were using a version that had been minified with something like packer using base62 encoding (which would have already removed nearly all uses of &quot;function&quot; and &quot;return&quot; at the cost of eval time). If the latter case is true, I don&#039;t think that&#039;s a very fair test, since the packed version is effectively doing (to a much greater extent!) what Alex is suggesting already.

This isn&#039;t to say that I think the size over the wire is really the most important consideration here (gzipping both versions reduces the difference to 339 bytes). The function(){} form in JS is as annoying as the array() literal in PHP.

The minified version I used:
http://code.google.com/p/jqueryjs/downloads/detail?name=jquery-1.3.2.min.js

Packer:
http://dean.edwards.name/packer/</description>
		<content:encoded><![CDATA[<p>@Ian: I grabbed the most recent minified version of jQuery and did a simple:</p>
<p>sed -E -e &#8216;s/\s*function\s*/#/g&#8217; -e &#8216;s/\s*return\s*//&#8217;</p>
<p>&#8230;and got a savings of 4,220 bytes. So either the library grew an awful lot, or you were using a version that had been minified with something like packer using base62 encoding (which would have already removed nearly all uses of &#8220;function&#8221; and &#8220;return&#8221; at the cost of eval time). If the latter case is true, I don&#8217;t think that&#8217;s a very fair test, since the packed version is effectively doing (to a much greater extent!) what Alex is suggesting already.</p>
<p>This isn&#8217;t to say that I think the size over the wire is really the most important consideration here (gzipping both versions reduces the difference to 339 bytes). The function(){} form in JS is as annoying as the array() literal in PHP.</p>
<p>The minified version I used:<br />
<a href="http://code.google.com/p/jqueryjs/downloads/detail?name=jquery-1.3.2.min.js" rel="nofollow">http://code.google.com/p/jqueryjs/downloads/detail?name=jquery-1.3.2.min.js</a></p>
<p>Packer:<br />
<a href="http://dean.edwards.name/packer/" rel="nofollow">http://dean.edwards.name/packer/</a></p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Ajaxian &#187; Cramdas; Don’t mess with the semantics of function, just let me stop typing it so often</title>
		<link>http://infrequently.org/2009/05/on-js-lambdas/comment-page-1/#comment-236024</link>
		<dc:creator>Ajaxian &#187; Cramdas; Don’t mess with the semantics of function, just let me stop typing it so often</dc:creator>
		<pubDate>Thu, 21 May 2009 14:23:43 +0000</pubDate>
		<guid isPermaLink="false">http://alex.dojotoolkit.org/?p=976#comment-236024</guid>
		<description>[...] comes from his proposal for JS Lambdas (or Cramdas). He continues:  It’s a crime, then, that we still have to type: PLAIN TEXT [...]</description>
		<content:encoded><![CDATA[<p>[...] comes from his proposal for JS Lambdas (or Cramdas). He continues:  It’s a crime, then, that we still have to type: PLAIN TEXT [...]</p>
]]></content:encoded>
	</item>
</channel>
</rss>

