<?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: Can Your Programming Language Do This? Javascript Can.</title>
	<atom:link href="http://ajaxian.com/archives/can-your-programming-language-do-this-javascript-can/feed" rel="self" type="application/rss+xml" />
	<link>http://ajaxian.com/archives/can-your-programming-language-do-this-javascript-can</link>
	<description>Cleaning up the web with Ajax</description>
	<lastBuildDate>Thu, 09 Feb 2012 06:55:33 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.2</generator>
	<item>
		<title>By: Ryan Gahl</title>
		<link>http://ajaxian.com/archives/can-your-programming-language-do-this-javascript-can/comment-page-1#comment-61762</link>
		<dc:creator>Ryan Gahl</dc:creator>
		<pubDate>Mon, 07 Aug 2006 16:47:58 +0000</pubDate>
		<guid isPermaLink="false">http://ajaxian.com/?p=1448#comment-61762</guid>
		<description>To overcome the anonymous function debugging problem you can use an AOP call dispatch layer to inject debug statements (which would be a good idea even without anonymous functions), or simply hard code in your debug calls to a known named globally scoped function, which you can then use your debugger to attach a breakpoint in and then step through into the anonymous code...

[code]
function AnonymousDebug()
{
    //place debugger breakpoint here
}

//...pseudo code...
myObj.doSomething(&quot;foo&quot;, function(something)
{
     //for debugging purposes, make call to globally scoped named function
    AnonymousDebug();

    //...now do something, and if I have a breakpoint set in the AnonymousDebug function I can now step through all this code
});
[/code]</description>
		<content:encoded><![CDATA[<p>To overcome the anonymous function debugging problem you can use an AOP call dispatch layer to inject debug statements (which would be a good idea even without anonymous functions), or simply hard code in your debug calls to a known named globally scoped function, which you can then use your debugger to attach a breakpoint in and then step through into the anonymous code&#8230;</p>
<p>[code]<br />
function AnonymousDebug()<br />
{<br />
    //place debugger breakpoint here<br />
}</p>
<p>//...pseudo code...<br />
myObj.doSomething("foo", function(something)<br />
{<br />
     //for debugging purposes, make call to globally scoped named function<br />
    AnonymousDebug();</p>
<p>    //...now do something, and if I have a breakpoint set in the AnonymousDebug function I can now step through all this code<br />
});<br />
[/code]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Stephen Kellett</title>
		<link>http://ajaxian.com/archives/can-your-programming-language-do-this-javascript-can/comment-page-1#comment-61608</link>
		<dc:creator>Stephen Kellett</dc:creator>
		<pubDate>Mon, 07 Aug 2006 12:20:30 +0000</pubDate>
		<guid isPermaLink="false">http://ajaxian.com/?p=1448#comment-61608</guid>
		<description>Totally disagree about the &quot;more readable&quot; bit. I hate seeing fucntions defined on the fly. Sloppy and lazy are what come to mind when I see this.

Quite apart from the mess you get in a profiling tool because the function is anonymous rather than named. You need to think bigger picture - maintenance and debugging support. If you don&#039;t know the name of the function (and you often won&#039;t have a filename or line number either for an anonymous function) you run into a lot of trouble if you should need to use the debugger or a complementary software tool (profiler, memory leak debugger, flow tracer...)</description>
		<content:encoded><![CDATA[<p>Totally disagree about the &#8220;more readable&#8221; bit. I hate seeing fucntions defined on the fly. Sloppy and lazy are what come to mind when I see this.</p>
<p>Quite apart from the mess you get in a profiling tool because the function is anonymous rather than named. You need to think bigger picture &#8211; maintenance and debugging support. If you don&#8217;t know the name of the function (and you often won&#8217;t have a filename or line number either for an anonymous function) you run into a lot of trouble if you should need to use the debugger or a complementary software tool (profiler, memory leak debugger, flow tracer&#8230;)</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: CW</title>
		<link>http://ajaxian.com/archives/can-your-programming-language-do-this-javascript-can/comment-page-1#comment-61563</link>
		<dc:creator>CW</dc:creator>
		<pubDate>Mon, 07 Aug 2006 10:02:27 +0000</pubDate>
		<guid isPermaLink="false">http://ajaxian.com/?p=1448#comment-61563</guid>
		<description>This is really nothing special. Yes some languages doesn&#039;t support it, but that doesn&#039;t mean the same thing cannot be achieved. With the use of some simple design patterns such as the Strategy Pattern, even java can do it (abeit being quite very cumbersome, but comes with much more stability and safety).</description>
		<content:encoded><![CDATA[<p>This is really nothing special. Yes some languages doesn&#8217;t support it, but that doesn&#8217;t mean the same thing cannot be achieved. With the use of some simple design patterns such as the Strategy Pattern, even java can do it (abeit being quite very cumbersome, but comes with much more stability and safety).</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Valery Silaev</title>
		<link>http://ajaxian.com/archives/can-your-programming-language-do-this-javascript-can/comment-page-1#comment-61529</link>
		<dc:creator>Valery Silaev</dc:creator>
		<pubDate>Mon, 07 Aug 2006 08:30:10 +0000</pubDate>
		<guid isPermaLink="false">http://ajaxian.com/?p=1448#comment-61529</guid>
		<description>@Masklinn / August 6, 2006
&lt;i&gt;Oh, and by the way Joelâ€™s MAP function is completely un-functional as it works through side-effects, modifying the input array parameter which is a huge no-no in FP.&lt;/i&gt;

Yes, &quot;map&quot; with side-effects must be named &quot;map!&quot; :))

VS</description>
		<content:encoded><![CDATA[<p>@Masklinn / August 6, 2006<br />
<i>Oh, and by the way Joelâ€™s MAP function is completely un-functional as it works through side-effects, modifying the input array parameter which is a huge no-no in FP.</i></p>
<p>Yes, &#8220;map&#8221; with side-effects must be named &#8220;map!&#8221; :))</p>
<p>VS</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Steven Elliott</title>
		<link>http://ajaxian.com/archives/can-your-programming-language-do-this-javascript-can/comment-page-1#comment-61223</link>
		<dc:creator>Steven Elliott</dc:creator>
		<pubDate>Sun, 06 Aug 2006 21:33:30 +0000</pubDate>
		<guid isPermaLink="false">http://ajaxian.com/?p=1448#comment-61223</guid>
		<description>....for some reason the rest of the code won&#039;t post even wrapped in code block.  If you want the rest please email me at $lastname at interactivetec dot com.

Steven</description>
		<content:encoded><![CDATA[<p>&#8230;.for some reason the rest of the code won&#8217;t post even wrapped in code block.  If you want the rest please email me at $lastname at interactivetec dot com.</p>
<p>Steven</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Steven Elliott</title>
		<link>http://ajaxian.com/archives/can-your-programming-language-do-this-javascript-can/comment-page-1#comment-61217</link>
		<dc:creator>Steven Elliott</dc:creator>
		<pubDate>Sun, 06 Aug 2006 21:22:15 +0000</pubDate>
		<guid isPermaLink="false">http://ajaxian.com/?p=1448#comment-61217</guid>
		<description>.....the rest
	//Only want to add the file once even though it may be included in various places.
	var scriptPath = &quot;&quot;;
	for( var i = 0; i </description>
		<content:encoded><![CDATA[<p>&#8230;..the rest<br />
	//Only want to add the file once even though it may be included in various places.<br />
	var scriptPath = &#8220;&#8221;;<br />
	for( var i = 0; i</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Steven Elliott</title>
		<link>http://ajaxian.com/archives/can-your-programming-language-do-this-javascript-can/comment-page-1#comment-61216</link>
		<dc:creator>Steven Elliott</dc:creator>
		<pubDate>Sun, 06 Aug 2006 21:18:03 +0000</pubDate>
		<guid isPermaLink="false">http://ajaxian.com/?p=1448#comment-61216</guid>
		<description>I use this for includes.  Once loaded you can either load dependencies from the page or from a .js file as in:
include(&quot;/admin/js/org/tool-man/core.js&quot;,null);
Has been tested with FF and IE 6.+
No scope but and little management but that all could be added.

best,
Steven

&lt;code&gt;
/**
  * First thing to load. The ablitiy to load dependencies in a js file
  * @param file - path if relative must be relative from where the &quot;document&quot; is being
  * loaded.  This would be relative to the jsp or html file and not relative
  * to the .js file.  For instance if the file being loaded is:
  *     www.yourserver.com/page.html
  * And in page.html you were loading js files in the HEAD  with a relative SRC of
  *   scripts/my.js and my.js included(&quot;myOther.js&quot;) , myOther.js would be relative to page.html and NOT
  *   my.js.
  * An easier way is to simply make the include(path) absolute from the root of the application.
  */
function include(file, id)
{
  var s = document.createElement(&quot;SCRIPT&quot;);
  //Make sure that the file address is absolute
  var ln = document.location.pathname.lastIndexOf(&quot;/&quot;)+1;
  var absPath = document.location.pathname.substr(0,ln) 
  if( file.substr(0,1) != &quot;/&quot; )
  {
    file = absPath+file;
  }
  s.src = file;
  s.type=&#039;text/javascript&#039;;
  s.language=&quot;javascript&quot;;
  if( id != null )
    s.id = id;
  var head = document.getElementsByTagName(&#039;head&#039;)[0];
  //Only want to add the file once even though it may be included in various places.
  var scriptPath = &quot;&quot;;
  for( var i = 0; i &lt;/code&gt;</description>
		<content:encoded><![CDATA[<p>I use this for includes.  Once loaded you can either load dependencies from the page or from a .js file as in:<br />
include(&#8220;/admin/js/org/tool-man/core.js&#8221;,null);<br />
Has been tested with FF and IE 6.+<br />
No scope but and little management but that all could be added.</p>
<p>best,<br />
Steven</p>
<p><code><br />
/**<br />
  * First thing to load. The ablitiy to load dependencies in a js file<br />
  * @param file - path if relative must be relative from where the "document" is being<br />
  * loaded.  This would be relative to the jsp or html file and not relative<br />
  * to the .js file.  For instance if the file being loaded is:<br />
  *     <a href="http://www.yourserver.com/page.html" rel="nofollow">http://www.yourserver.com/page.html</a><br />
  * And in page.html you were loading js files in the HEAD  with a relative SRC of<br />
  *   scripts/my.js and my.js included("myOther.js") , myOther.js would be relative to page.html and NOT<br />
  *   my.js.<br />
  * An easier way is to simply make the include(path) absolute from the root of the application.<br />
  */<br />
function include(file, id)<br />
{<br />
  var s = document.createElement("SCRIPT");<br />
  //Make sure that the file address is absolute<br />
  var ln = document.location.pathname.lastIndexOf("/")+1;<br />
  var absPath = document.location.pathname.substr(0,ln)<br />
  if( file.substr(0,1) != "/" )<br />
  {<br />
    file = absPath+file;<br />
  }<br />
  s.src = file;<br />
  s.type='text/javascript';<br />
  s.language="javascript";<br />
  if( id != null )<br />
    s.id = id;<br />
  var head = document.getElementsByTagName('head')[0];<br />
  //Only want to add the file once even though it may be included in various places.<br />
  var scriptPath = "";<br />
  for( var i = 0; i </code></p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Simon Lodal</title>
		<link>http://ajaxian.com/archives/can-your-programming-language-do-this-javascript-can/comment-page-1#comment-60936</link>
		<dc:creator>Simon Lodal</dc:creator>
		<pubDate>Sun, 06 Aug 2006 13:54:41 +0000</pubDate>
		<guid isPermaLink="false">http://ajaxian.com/?p=1448#comment-60936</guid>
		<description>&lt;blockquote&gt;Anonymous function syntax (what you term â€œcreating functions on the flyâ€) certainly doesnâ€™t cause any performance issues&lt;/blockquote&gt;

Yes, it might cause a performance hit. Anonymous functions are often closures, like in the second example:
&lt;code&gt;
Cook(&quot;lobster&quot;, &quot;water&quot;, function(x) { alert(&quot;pot &quot; + x); }  );
&lt;/code&gt;

When this is executed inside a function, the inline function becomes a closure. When it is executed by Cook(), symbol references inside the inline functions are looked up in 3 steps:
1) Local scope; local variables and arguments.
2) Closure scope.
3) Global scope.

#2 is the mythical performance hit. The global scope is just the outermost closure that all functions have. But closures can be chained (with the global scope always being last, and of course there could be more closure levels), which is the case here. Each extra level in the chain causes a performance hit in symbol lookup.

You might avoid the hit if the inline function only references local variables.

The performance hit has always been mentioned but not explained in Netscape docs, also related to &#039;with&#039; statements, but I believe it is overstated. Hash lookups are extremely fast and should not cost much compared to all the other things a script interpreter does.</description>
		<content:encoded><![CDATA[<blockquote><p>Anonymous function syntax (what you term â€œcreating functions on the flyâ€) certainly doesnâ€™t cause any performance issues</p></blockquote>
<p>Yes, it might cause a performance hit. Anonymous functions are often closures, like in the second example:<br />
<code><br />
Cook("lobster", "water", function(x) { alert("pot " + x); }  );<br />
</code></p>
<p>When this is executed inside a function, the inline function becomes a closure. When it is executed by Cook(), symbol references inside the inline functions are looked up in 3 steps:<br />
1) Local scope; local variables and arguments.<br />
2) Closure scope.<br />
3) Global scope.</p>
<p>#2 is the mythical performance hit. The global scope is just the outermost closure that all functions have. But closures can be chained (with the global scope always being last, and of course there could be more closure levels), which is the case here. Each extra level in the chain causes a performance hit in symbol lookup.</p>
<p>You might avoid the hit if the inline function only references local variables.</p>
<p>The performance hit has always been mentioned but not explained in Netscape docs, also related to &#8216;with&#8217; statements, but I believe it is overstated. Hash lookups are extremely fast and should not cost much compared to all the other things a script interpreter does.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Bill de hOra</title>
		<link>http://ajaxian.com/archives/can-your-programming-language-do-this-javascript-can/comment-page-1#comment-60840</link>
		<dc:creator>Bill de hOra</dc:creator>
		<pubDate>Sun, 06 Aug 2006 11:34:46 +0000</pubDate>
		<guid isPermaLink="false">http://ajaxian.com/?p=1448#comment-60840</guid>
		<description>Nice. Now what&#039;s javascript&#039;s answer for packaging and import?</description>
		<content:encoded><![CDATA[<p>Nice. Now what&#8217;s javascript&#8217;s answer for packaging and import?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Gareth</title>
		<link>http://ajaxian.com/archives/can-your-programming-language-do-this-javascript-can/comment-page-1#comment-60835</link>
		<dc:creator>Gareth</dc:creator>
		<pubDate>Sun, 06 Aug 2006 11:20:05 +0000</pubDate>
		<guid isPermaLink="false">http://ajaxian.com/?p=1448#comment-60835</guid>
		<description>&lt;blockquote cite=&quot;Simon Willison&quot;&gt;Anonymous function syntax (what you term â€œcreating functions on the flyâ€) certainly doesnâ€™t cause any performance issues - itâ€™s just an alternative syntax to regular named functions.&lt;/blockquote&gt;

Well, apart from the fact that if you create anonymous functions in a loop for example, you get x copies of the function object. With a named function, you get one function object with x references to it - much more efficient</description>
		<content:encoded><![CDATA[<blockquote cite="Simon Willison"><p>Anonymous function syntax (what you term â€œcreating functions on the flyâ€) certainly doesnâ€™t cause any performance issues &#8211; itâ€™s just an alternative syntax to regular named functions.</p></blockquote>
<p>Well, apart from the fact that if you create anonymous functions in a loop for example, you get x copies of the function object. With a named function, you get one function object with x references to it &#8211; much more efficient</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Troels</title>
		<link>http://ajaxian.com/archives/can-your-programming-language-do-this-javascript-can/comment-page-1#comment-60793</link>
		<dc:creator>Troels</dc:creator>
		<pubDate>Sun, 06 Aug 2006 08:26:18 +0000</pubDate>
		<guid isPermaLink="false">http://ajaxian.com/?p=1448#comment-60793</guid>
		<description>What John Leavitt tries to communicate with the above comment, is that lisp is also a function-oriented language. (And even more so than js).
However - what&#039;s interesting with js is that it&#039;s the first functional language to break through on a large scale - partially because it&#039;s a hybrid. That it&#039;s used in a book on function programming further consolidates this position. That&#039;s indeed interesting - thanks Michael.</description>
		<content:encoded><![CDATA[<p>What John Leavitt tries to communicate with the above comment, is that lisp is also a function-oriented language. (And even more so than js).<br />
However &#8211; what&#8217;s interesting with js is that it&#8217;s the first functional language to break through on a large scale &#8211; partially because it&#8217;s a hybrid. That it&#8217;s used in a book on function programming further consolidates this position. That&#8217;s indeed interesting &#8211; thanks Michael.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Masklinn</title>
		<link>http://ajaxian.com/archives/can-your-programming-language-do-this-javascript-can/comment-page-1#comment-60778</link>
		<dc:creator>Masklinn</dc:creator>
		<pubDate>Sun, 06 Aug 2006 08:10:08 +0000</pubDate>
		<guid isPermaLink="false">http://ajaxian.com/?p=1448#comment-60778</guid>
		<description>&gt; As for memory leaks, as long as youâ€™re not assigning any references involving DOM elements youâ€™ll be fine. 
&gt; If you are, you need to have a proper understanding of whatâ€™s going on or you could run in to problems.

And only MSIE really has issues with that, too.

Oh, and by the way Joel&#039;s MAP function is completely un-functional as it works through side-effects, modifying the input array parameter which is a huge no-no in FP.

&gt; Closures (a.k.a. anonymous first-class functions) are supported since C# 2.0.

Closures and anonymous first-class functions are different beasts, and while closures are often implemented via anonymous first-class functions they&#039;re different concepts.

For example you could use anonymous first-class function in a factory-type pattern, returning different functions based on it&#039;s input. And you don&#039;t need closures to do that.</description>
		<content:encoded><![CDATA[<p>&gt; As for memory leaks, as long as youâ€™re not assigning any references involving DOM elements youâ€™ll be fine.<br />
&gt; If you are, you need to have a proper understanding of whatâ€™s going on or you could run in to problems.</p>
<p>And only MSIE really has issues with that, too.</p>
<p>Oh, and by the way Joel&#8217;s MAP function is completely un-functional as it works through side-effects, modifying the input array parameter which is a huge no-no in FP.</p>
<p>&gt; Closures (a.k.a. anonymous first-class functions) are supported since C# 2.0.</p>
<p>Closures and anonymous first-class functions are different beasts, and while closures are often implemented via anonymous first-class functions they&#8217;re different concepts.</p>
<p>For example you could use anonymous first-class function in a factory-type pattern, returning different functions based on it&#8217;s input. And you don&#8217;t need closures to do that.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Â¿Ud. sabÃ­a que&#8230; at Gadmonks</title>
		<link>http://ajaxian.com/archives/can-your-programming-language-do-this-javascript-can/comment-page-1#comment-60738</link>
		<dc:creator>Â¿Ud. sabÃ­a que&#8230; at Gadmonks</dc:creator>
		<pubDate>Sun, 06 Aug 2006 06:23:21 +0000</pubDate>
		<guid isPermaLink="false">http://ajaxian.com/?p=1448#comment-60738</guid>
		<description>[...] Pues yo no lo sabÃ­a, y lo supe gracias a Ajaxian. [...]</description>
		<content:encoded><![CDATA[<p>[...] Pues yo no lo sabÃ­a, y lo supe gracias a Ajaxian. [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: John Leavitt</title>
		<link>http://ajaxian.com/archives/can-your-programming-language-do-this-javascript-can/comment-page-1#comment-60668</link>
		<dc:creator>John Leavitt</dc:creator>
		<pubDate>Sun, 06 Aug 2006 03:39:50 +0000</pubDate>
		<guid isPermaLink="false">http://ajaxian.com/?p=1448#comment-60668</guid>
		<description>&lt;code&gt;
(defun cook (i1 i2 f)
   (format t &quot;get the ~S~%&quot; i1)
   (apply f i1)
   (apply f i2)
)

(cook &#039;lobster &#039;water &#039;PutinPut)
(cook &#039;chicken &#039;coconut &#039;BoomBoom)
&lt;/code&gt;</description>
		<content:encoded><![CDATA[<p><code><br />
(defun cook (i1 i2 f)<br />
   (format t "get the ~S~%" i1)<br />
   (apply f i1)<br />
   (apply f i2)<br />
)</p>
<p>(cook 'lobster 'water 'PutinPut)<br />
(cook 'chicken 'coconut 'BoomBoom)<br />
</code></p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Min-hee Hong</title>
		<link>http://ajaxian.com/archives/can-your-programming-language-do-this-javascript-can/comment-page-1#comment-60584</link>
		<dc:creator>Min-hee Hong</dc:creator>
		<pubDate>Sun, 06 Aug 2006 02:01:52 +0000</pubDate>
		<guid isPermaLink="false">http://ajaxian.com/?p=1448#comment-60584</guid>
		<description>&lt;code&gt;
def cook(i1, i2, f):
&#160;&#160;&#160;&#160;print &#039;get the&#039;, i1
&#160;&#160;&#160;&#160;f(i1)
&#160;&#160;&#160;&#160;f(i2)


&#160;&#160;&#160;&#160;cook(&#039;lobster&#039;, &#039;water&#039;, PutInPot)
&#160;&#160;&#160;&#160;cook(&#039;chicken&#039;, &#039;coconut&#039;, BoomBoom)&lt;/code&gt;</description>
		<content:encoded><![CDATA[<p><code><br />
def cook(i1, i2, f):<br />
&nbsp;&nbsp;&nbsp;&nbsp;print 'get the', i1<br />
&nbsp;&nbsp;&nbsp;&nbsp;f(i1)<br />
&nbsp;&nbsp;&nbsp;&nbsp;f(i2)</p>
<p>&nbsp;&nbsp;&nbsp;&nbsp;cook('lobster', 'water', PutInPot)<br />
&nbsp;&nbsp;&nbsp;&nbsp;cook('chicken', 'coconut', BoomBoom)</code></p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Steve Bjorg</title>
		<link>http://ajaxian.com/archives/can-your-programming-language-do-this-javascript-can/comment-page-1#comment-60514</link>
		<dc:creator>Steve Bjorg</dc:creator>
		<pubDate>Sat, 05 Aug 2006 23:51:10 +0000</pubDate>
		<guid isPermaLink="false">http://ajaxian.com/?p=1448#comment-60514</guid>
		<description>Closures (a.k.a. anonymous first-class functions) are supported since C# 2.0.  With the additon of type-safety, it makes C# the perfect language for writing flexible Web 2.0 services.  That&#039;s why chose it for platform.
Closures are an important part of modern software engineering and really a great tool in a developer&#039;s toolbox.</description>
		<content:encoded><![CDATA[<p>Closures (a.k.a. anonymous first-class functions) are supported since C# 2.0.  With the additon of type-safety, it makes C# the perfect language for writing flexible Web 2.0 services.  That&#8217;s why chose it for platform.<br />
Closures are an important part of modern software engineering and really a great tool in a developer&#8217;s toolbox.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Simon Willison</title>
		<link>http://ajaxian.com/archives/can-your-programming-language-do-this-javascript-can/comment-page-1#comment-60502</link>
		<dc:creator>Simon Willison</dc:creator>
		<pubDate>Sat, 05 Aug 2006 23:06:22 +0000</pubDate>
		<guid isPermaLink="false">http://ajaxian.com/?p=1448#comment-60502</guid>
		<description>Anonymous function syntax (what you term &quot;creating functions on the fly&quot;) certainly doesn&#039;t cause any performance issues - it&#039;s just an alternative syntax to regular named functions. The only time it would cause performance issues is if you were creating a new function using a Function constructor because that involves evaling strings.

As for memory leaks, as long as you&#039;re not assigning any references involving DOM elements you&#039;ll be fine. If you are, you need to have a proper understanding of what&#039;s going on or you could run in to problems.</description>
		<content:encoded><![CDATA[<p>Anonymous function syntax (what you term &#8220;creating functions on the fly&#8221;) certainly doesn&#8217;t cause any performance issues &#8211; it&#8217;s just an alternative syntax to regular named functions. The only time it would cause performance issues is if you were creating a new function using a Function constructor because that involves evaling strings.</p>
<p>As for memory leaks, as long as you&#8217;re not assigning any references involving DOM elements you&#8217;ll be fine. If you are, you need to have a proper understanding of what&#8217;s going on or you could run in to problems.</p>
]]></content:encoded>
	</item>
</channel>
</rss>

