<?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: C# is Number 1(0)!</title>
	<atom:link href="http://mono-nono.com/2009/08/19/c-is-number-10/feed/" rel="self" type="application/rss+xml" />
	<link>http://mono-nono.com/2009/08/19/c-is-number-10/</link>
	<description>Fire is the one, who inspires and protects truth.</description>
	<lastBuildDate>Sun, 20 Dec 2009 07:04:36 +0900</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
		<item>
		<title>By: ray</title>
		<link>http://mono-nono.com/2009/08/19/c-is-number-10/comment-page-1/#comment-1098</link>
		<dc:creator>ray</dc:creator>
		<pubDate>Mon, 31 Aug 2009 17:55:11 +0000</pubDate>
		<guid isPermaLink="false">http://mono-nono.com/?p=553#comment-1098</guid>
		<description>Thank you Richard and Anirudh!

Just happened across this exchange.
This REALLY gives me a clue (many actually) on
productive ways to view and use JavaScript.

Ray Heinrich

P.S. Just babbling today so...
 An old hippy &quot;programmer&quot; (she refuses any other
title) friend of mine read your exchange at my suggestion.
She told me that, for someone at my level, a convincing
myth was often very helpful.  She&#039;s an elitist who 
sometimes wears a 50th anniversary LISP T-shirt with 
a picture of John McCarthy on it made out of parentheses. 
LISP, she says, is very much alive.  She used it at Boeing
and knows people who use it for writing video games.
(I ask her for tips on writing in ALGOL.net just to bug her.)</description>
		<content:encoded><![CDATA[<p>Thank you Richard and Anirudh!</p>
<p>Just happened across this exchange.<br />
This REALLY gives me a clue (many actually) on<br />
productive ways to view and use JavaScript.</p>
<p>Ray Heinrich</p>
<p>P.S. Just babbling today so&#8230;<br />
 An old hippy &#8220;programmer&#8221; (she refuses any other<br />
title) friend of mine read your exchange at my suggestion.<br />
She told me that, for someone at my level, a convincing<br />
myth was often very helpful.  She&#8217;s an elitist who<br />
sometimes wears a 50th anniversary LISP T-shirt with<br />
a picture of John McCarthy on it made out of parentheses.<br />
LISP, she says, is very much alive.  She used it at Boeing<br />
and knows people who use it for writing video games.<br />
(I ask her for tips on writing in ALGOL.net just to bug her.)</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Edward Kmett</title>
		<link>http://mono-nono.com/2009/08/19/c-is-number-10/comment-page-1/#comment-1073</link>
		<dc:creator>Edward Kmett</dc:creator>
		<pubDate>Thu, 20 Aug 2009 15:18:11 +0000</pubDate>
		<guid isPermaLink="false">http://mono-nono.com/?p=553#comment-1073</guid>
		<description>Interesting that the entire Koders knowledgebase contains no Haskell code whatsoever. 

So there appears to be at least _some_ selection bias going on here.

Alas, there seem to be no absolute numbers to compare against.</description>
		<content:encoded><![CDATA[<p>Interesting that the entire Koders knowledgebase contains no Haskell code whatsoever. </p>
<p>So there appears to be at least _some_ selection bias going on here.</p>
<p>Alas, there seem to be no absolute numbers to compare against.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Richard</title>
		<link>http://mono-nono.com/2009/08/19/c-is-number-10/comment-page-1/#comment-1072</link>
		<dc:creator>Richard</dc:creator>
		<pubDate>Thu, 20 Aug 2009 10:51:08 +0000</pubDate>
		<guid isPermaLink="false">http://mono-nono.com/?p=553#comment-1072</guid>
		<description>Anirudh,

;) This is how I felt about Javascript about 2 years ago.  Let me tell you what changed my mind.

Firstly, a lot of credit goes to Douglas Crockford.  If you haven&#039;t already, I heartily recommend reading &lt;a href=&quot;http://javascript.crockford.com/prototypal.html&quot; rel=&quot;nofollow&quot;&gt;this&lt;/a&gt; -- it opened my eyes, and I kept reading.  Fundamentally, Javascript is &lt;strong&gt;not&lt;/strong&gt; an OO language with &lt;em&gt;classical&lt;/em&gt; inheritance.  It is a functional language with OO influences and &lt;em&gt;prototypical&lt;/em&gt; inheritance.  You already know this, I think, but your code doesn&#039;t reflect it yet -- so you probably don&#039;t understand it on a deep enough level yet.  Let me demonstrate:

For matters of scope, you should be doing:

function A() {
   var self = this;
   self.X = 5;
   self.B = function() {
      this.X = 5; // this refers to &#039;B&#039;, I&#039;d think.
      self.X = 10; // now we&#039;re changing &#039;A&#039;.
   };
};

Basically, alias &#039;self&#039; or &#039;me&#039; or some other obviously-named variable to &quot;this&quot; as a first step.  Gains you a lot of readability, and stops you from making debugger-unfriendly mistakes.

The reason that you&#039;re having difficulty with early and late binding is because you&#039;re thinking about binding instead of scope.  Binding is &lt;strong&gt;always&lt;/strong&gt; late-binding, so don&#039;t think that you can get around that.  Instead, think about capturing context with scope.  You&#039;re thinking in an imperative model, but you should be thinking in a functional way.  Let me &quot;functionalize&quot; your example, and you&#039;ll see what I mean.

var invariant = 10;
for_each(range(0,10), function(idx, item) {
   $(&#039;#button-&#039;+item).click(function() {
       alert(item); alert(invariant);
   });
});

What you have done here is separate out the invariant -- which is what you want to bind &quot;early&quot; -- and that makes the logic much clearer ... and, IMO, it also looks much prettier.  &lt;strong&gt;Do not&lt;/strong&gt; use &quot;for&quot; loops, use something like jQuery&#039;s $.each() or roll your own.  &quot;for&quot; loops introduce a variable into the scope that will be handled badly by closures, and Javascript is a language that relies on closures for its power.

I consider the equality system of JS to be a silly hack (&quot;===&quot;? Come off it), but for 99% of things it doesn&#039;t get in your way, so I can live with it.  You seem to like strongly-typed languages, which is fine, but if you use Javascript you just need to get out of that mindset.  It&#039;s a barrier to your understanding, just blow it away.

&lt;blockquote&gt;Again, even if you’re streaming JSON, you’ll need to stream each attribute and other little data, and it’s very hard for a designer to make changes and see how things are supposed to work, especially if you follow some cryptic logic like Paul Graham’s Arc-based hacker news backend to generate the structure.&lt;/blockquote&gt;

I think that when you get to stream JSON across, you&#039;ll see that this isn&#039;t as much of a concern as you might think it is.  If anything, it forces you to think more explicitly about what the front-end needs, and that&#039;s an excellent thing.  When you get into the habit, you are able to visualise your objective much more clearly.

&lt;blockquote&gt;I had once found a minor security hole in JSON based JS&lt;/blockquote&gt;

Heheh, yes, that&#039;s been around since Day 1.  Becoming very much a concern of the past, due to the browser implementations native JSON parsing that we have now, and libraries that do parsing properly even without native implementations.  I class this one with &quot;SQL injection&quot;: easy enough to avoid, but people (through ignorance?) don&#039;t avoid it.

In summary -- I can see why you&#039;ve had trouble with JS.  But that&#039;s because you&#039;re trying to impose a strongly-typed classical system on it ... it&#039;s like trying to write Python as though it were C.  It can be done, sure, but &lt;em&gt;why&lt;/em&gt; would you want to?  Get used to Javascript, read the Crockford article and go from there, get comfortable with it, play around a bit ... and hey, you might ever get a bit attached to it in the end ;).</description>
		<content:encoded><![CDATA[<p>Anirudh,</p>
<p> <img src='http://mono-nono.com/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' />  This is how I felt about Javascript about 2 years ago.  Let me tell you what changed my mind.</p>
<p>Firstly, a lot of credit goes to Douglas Crockford.  If you haven&#8217;t already, I heartily recommend reading <a href="http://javascript.crockford.com/prototypal.html" rel="nofollow">this</a> &#8212; it opened my eyes, and I kept reading.  Fundamentally, Javascript is <strong>not</strong> an OO language with <em>classical</em> inheritance.  It is a functional language with OO influences and <em>prototypical</em> inheritance.  You already know this, I think, but your code doesn&#8217;t reflect it yet &#8212; so you probably don&#8217;t understand it on a deep enough level yet.  Let me demonstrate:</p>
<p>For matters of scope, you should be doing:</p>
<p>function A() {<br />
   var self = this;<br />
   self.X = 5;<br />
   self.B = function() {<br />
      this.X = 5; // this refers to &#8216;B&#8217;, I&#8217;d think.<br />
      self.X = 10; // now we&#8217;re changing &#8216;A&#8217;.<br />
   };<br />
};</p>
<p>Basically, alias &#8217;self&#8217; or &#8216;me&#8217; or some other obviously-named variable to &#8220;this&#8221; as a first step.  Gains you a lot of readability, and stops you from making debugger-unfriendly mistakes.</p>
<p>The reason that you&#8217;re having difficulty with early and late binding is because you&#8217;re thinking about binding instead of scope.  Binding is <strong>always</strong> late-binding, so don&#8217;t think that you can get around that.  Instead, think about capturing context with scope.  You&#8217;re thinking in an imperative model, but you should be thinking in a functional way.  Let me &#8220;functionalize&#8221; your example, and you&#8217;ll see what I mean.</p>
<p>var invariant = 10;<br />
for_each(range(0,10), function(idx, item) {<br />
   $(&#8216;#button-&#8217;+item).click(function() {<br />
       alert(item); alert(invariant);<br />
   });<br />
});</p>
<p>What you have done here is separate out the invariant &#8212; which is what you want to bind &#8220;early&#8221; &#8212; and that makes the logic much clearer &#8230; and, IMO, it also looks much prettier.  <strong>Do not</strong> use &#8220;for&#8221; loops, use something like jQuery&#8217;s $.each() or roll your own.  &#8220;for&#8221; loops introduce a variable into the scope that will be handled badly by closures, and Javascript is a language that relies on closures for its power.</p>
<p>I consider the equality system of JS to be a silly hack (&#8220;===&#8221;? Come off it), but for 99% of things it doesn&#8217;t get in your way, so I can live with it.  You seem to like strongly-typed languages, which is fine, but if you use Javascript you just need to get out of that mindset.  It&#8217;s a barrier to your understanding, just blow it away.</p>
<blockquote><p>Again, even if you’re streaming JSON, you’ll need to stream each attribute and other little data, and it’s very hard for a designer to make changes and see how things are supposed to work, especially if you follow some cryptic logic like Paul Graham’s Arc-based hacker news backend to generate the structure.</p></blockquote>
<p>I think that when you get to stream JSON across, you&#8217;ll see that this isn&#8217;t as much of a concern as you might think it is.  If anything, it forces you to think more explicitly about what the front-end needs, and that&#8217;s an excellent thing.  When you get into the habit, you are able to visualise your objective much more clearly.</p>
<blockquote><p>I had once found a minor security hole in JSON based JS</p></blockquote>
<p>Heheh, yes, that&#8217;s been around since Day 1.  Becoming very much a concern of the past, due to the browser implementations native JSON parsing that we have now, and libraries that do parsing properly even without native implementations.  I class this one with &#8220;SQL injection&#8221;: easy enough to avoid, but people (through ignorance?) don&#8217;t avoid it.</p>
<p>In summary &#8212; I can see why you&#8217;ve had trouble with JS.  But that&#8217;s because you&#8217;re trying to impose a strongly-typed classical system on it &#8230; it&#8217;s like trying to write Python as though it were C.  It can be done, sure, but <em>why</em> would you want to?  Get used to Javascript, read the Crockford article and go from there, get comfortable with it, play around a bit &#8230; and hey, you might ever get a bit attached to it in the end <img src='http://mono-nono.com/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' /> .</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: C# fails to become popular &#187; Ad Terras Per Aspera</title>
		<link>http://mono-nono.com/2009/08/19/c-is-number-10/comment-page-1/#comment-1069</link>
		<dc:creator>C# fails to become popular &#187; Ad Terras Per Aspera</dc:creator>
		<pubDate>Wed, 19 Aug 2009 20:15:44 +0000</pubDate>
		<guid isPermaLink="false">http://mono-nono.com/?p=553#comment-1069</guid>
		<description>[...] C# fails to become popular  Permalink [...]</description>
		<content:encoded><![CDATA[<p>[...] C# fails to become popular  Permalink [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Anirudh</title>
		<link>http://mono-nono.com/2009/08/19/c-is-number-10/comment-page-1/#comment-1068</link>
		<dc:creator>Anirudh</dc:creator>
		<pubDate>Wed, 19 Aug 2009 17:58:31 +0000</pubDate>
		<guid isPermaLink="false">http://mono-nono.com/?p=553#comment-1068</guid>
		<description>Richard,

All the browser headaches aside, I have specific qualms with Javascript as a language as well. It&#039;s nice to make the function a first class citizen as a variable itself; but to make it a class? That doesn&#039;t make sense.

Consider this for example:
&lt;code&gt;
function A()
{
this.X = 5;
this.B = function()
{
this.X = 5; // Does this refer to the one from B or A?
};
};
&lt;/code&gt;
There are tons of confusion about scope, what the &quot;this&quot; keyword refers to, and tons of other issues. If I just had a &quot;class&quot; keyword, object oriented programming would be so much more easier.

Even late binding and anonymous functions are really bad. Consider I have ten buttons with ids button-0 to button-9
&lt;code&gt;
for(i=0;i&lt;10;i++)
{
var x = i;
$(&quot;#button-&quot; + i.ToString()).click(function(){
alert(i); // should be late binding
alert(x); // should be early binding
});
}
&lt;/code&gt;
I had huge issues making sure anonymous delegates and the binding and scopes work the way they are supposed to. You have to go through a massive hack to make early binding work, that involves creating another anonymous function (don&#039;t remember, and too doped up with monorphine to care.)

Apart from that, let&#039;s not forget the flimsy equality system, the type system that almost is, gentle encouragement to pollute the global namespace, the inability to query a HTMLElement properly unless it&#039;s actually part of the DOM (I&#039;ve had to use some 

As for your suggestion to use a JS MVC and stream JSON, that&#039;s relatively saner. I actually got to use Google&#039;s internal JS library when I interned there. It&#039;s called closure, and was originally &lt;a href=&quot;http://74.125.153.132/search?q=cache:Kx0B6jsmX_cJ:code.google.com/p/google-closure/+google+closure+javascript+library&amp;cd=1&amp;hl=en&amp;ct=clnk&amp;gl=in&amp;client=firefox-a&quot; rel=&quot;nofollow&quot;&gt;open sourced&lt;/a&gt; but now it&#039;s been taken down. It&#039;s actually pretty good and might even give jQuery serious competition because it has so many features, but manages to segregate them into a way to cherry pick features that you want.

Again, even if you&#039;re streaming JSON, you&#039;ll need to stream each attribute and other little data, and it&#039;s very hard for a designer to make changes and see how things are supposed to work, especially if you follow some cryptic logic like Paul Graham&#039;s Arc-based hacker news backend to generate the structure.

My RoR friends don&#039;t write any JS or HTML at all, they have some weird way of representing the hierarchy of content in their code, but ruby code for me looks like someone took out all the symbol keys from my keyboard, loaded it up into a twin barrel shotgun and shot me in the face with it.

Oh, btw, I had once found a minor security hole in JSON based JS. Since a lot of people use &quot;eval&quot; to deconstruct JSON objects, you can inject script into that.
so with a string like &quot;}}};alert(&quot;hello&quot;);// we showed that we could make browsers of users execute unsafe code by sending them to tainted links with strange GET parameters. If you&#039;re using the JSON.js library or Mozilla&#039;s you should be safer from this hole.

Man it feels good to rant!</description>
		<content:encoded><![CDATA[<p>Richard,</p>
<p>All the browser headaches aside, I have specific qualms with Javascript as a language as well. It&#8217;s nice to make the function a first class citizen as a variable itself; but to make it a class? That doesn&#8217;t make sense.</p>
<p>Consider this for example:<br />
<code><br />
function A()<br />
{<br />
this.X = 5;<br />
this.B = function()<br />
{<br />
this.X = 5; // Does this refer to the one from B or A?<br />
};<br />
};<br />
</code><br />
There are tons of confusion about scope, what the &#8220;this&#8221; keyword refers to, and tons of other issues. If I just had a &#8220;class&#8221; keyword, object oriented programming would be so much more easier.</p>
<p>Even late binding and anonymous functions are really bad. Consider I have ten buttons with ids button-0 to button-9<br />
<code><br />
for(i=0;i&lt;10;i++)<br />
{<br />
var x = i;<br />
$(&quot;#button-&quot; + i.ToString()).click(function(){<br />
alert(i); // should be late binding<br />
alert(x); // should be early binding<br />
});<br />
}<br />
</code><br />
I had huge issues making sure anonymous delegates and the binding and scopes work the way they are supposed to. You have to go through a massive hack to make early binding work, that involves creating another anonymous function (don&#8217;t remember, and too doped up with monorphine to care.)</p>
<p>Apart from that, let&#8217;s not forget the flimsy equality system, the type system that almost is, gentle encouragement to pollute the global namespace, the inability to query a HTMLElement properly unless it&#8217;s actually part of the DOM (I&#8217;ve had to use some </p>
<p>As for your suggestion to use a JS MVC and stream JSON, that&#8217;s relatively saner. I actually got to use Google&#8217;s internal JS library when I interned there. It&#8217;s called closure, and was originally <a href="http://74.125.153.132/search?q=cache:Kx0B6jsmX_cJ:code.google.com/p/google-closure/+google+closure+javascript+library&amp;cd=1&amp;hl=en&amp;ct=clnk&amp;gl=in&amp;client=firefox-a" rel="nofollow">open sourced</a> but now it&#8217;s been taken down. It&#8217;s actually pretty good and might even give jQuery serious competition because it has so many features, but manages to segregate them into a way to cherry pick features that you want.</p>
<p>Again, even if you&#8217;re streaming JSON, you&#8217;ll need to stream each attribute and other little data, and it&#8217;s very hard for a designer to make changes and see how things are supposed to work, especially if you follow some cryptic logic like Paul Graham&#8217;s Arc-based hacker news backend to generate the structure.</p>
<p>My RoR friends don&#8217;t write any JS or HTML at all, they have some weird way of representing the hierarchy of content in their code, but ruby code for me looks like someone took out all the symbol keys from my keyboard, loaded it up into a twin barrel shotgun and shot me in the face with it.</p>
<p>Oh, btw, I had once found a minor security hole in JSON based JS. Since a lot of people use &#8220;eval&#8221; to deconstruct JSON objects, you can inject script into that.<br />
so with a string like &#8220;}}};alert(&#8220;hello&#8221;);// we showed that we could make browsers of users execute unsafe code by sending them to tainted links with strange GET parameters. If you&#8217;re using the JSON.js library or Mozilla&#8217;s you should be safer from this hole.</p>
<p>Man it feels good to rant!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Richard</title>
		<link>http://mono-nono.com/2009/08/19/c-is-number-10/comment-page-1/#comment-1066</link>
		<dc:creator>Richard</dc:creator>
		<pubDate>Wed, 19 Aug 2009 16:38:12 +0000</pubDate>
		<guid isPermaLink="false">http://mono-nono.com/?p=553#comment-1066</guid>
		<description>Anirudh,

Well, I agree with you on the browser issue.  Fortunately, most JS that I&#039;ve written is for intranet apps, where I only have to code to one browser.  Using jQuery, it generally works on other browsers, which is nice.  Perhaps I&#039;ve got a better opinion of it due to the environment I&#039;ve used it in.  The situation is getting better, though -- I remember when we had to deal with IE5, and the horrible &quot;layers&quot; of NS4, and so forth.  And then MS put out that ridiculous nonsense about closures being evil ... sheesh!  Nowadays, there&#039;s more commonality than difference ...

I agree with you on the testing, and the debugging.  That&#039;ll also get better, I trust, and it&#039;s come a long way since having to write &quot;alert&quot; statements.  Threading is coming -- see the &quot;web workers&quot; from Mozilla -- but in the interim, the only thing that stops setInterval/setTimeout from being used as good-enough replacements is a lack of mutex primitives.

We disagree on method.  With respect, I don&#039;t think that the correct thing is to generate the DOM on the server at all.  I&#039;ve found a RESTful client-centric approach to be much better: stream JSON to the browser, create your DOM there, and just send back JSON as you need to.  This also minimises server load.  Takes about 1.5x the time to set this up (although MVC is making it easier), but once you&#039;ve got it set up for a particular application domain it&#039;s a remarkably flexible and modular way of doing things.

I also agree with you on the language aspect: Javascript is, fundamentally, a good language (with some bloody idiotic features, such as making global creation very easy).  However, Javascript+browser or Javascript+DOM interactions are &lt;em&gt;painful&lt;/em&gt;, and I therefore try to abstract away as many of those interactions as possible with jQuery.  These are the same interactions that you point to as being therapy material.  Are you sure that your hatred should not be directed at the DOM/browser, rather than the language?</description>
		<content:encoded><![CDATA[<p>Anirudh,</p>
<p>Well, I agree with you on the browser issue.  Fortunately, most JS that I&#8217;ve written is for intranet apps, where I only have to code to one browser.  Using jQuery, it generally works on other browsers, which is nice.  Perhaps I&#8217;ve got a better opinion of it due to the environment I&#8217;ve used it in.  The situation is getting better, though &#8212; I remember when we had to deal with IE5, and the horrible &#8220;layers&#8221; of NS4, and so forth.  And then MS put out that ridiculous nonsense about closures being evil &#8230; sheesh!  Nowadays, there&#8217;s more commonality than difference &#8230;</p>
<p>I agree with you on the testing, and the debugging.  That&#8217;ll also get better, I trust, and it&#8217;s come a long way since having to write &#8220;alert&#8221; statements.  Threading is coming &#8212; see the &#8220;web workers&#8221; from Mozilla &#8212; but in the interim, the only thing that stops setInterval/setTimeout from being used as good-enough replacements is a lack of mutex primitives.</p>
<p>We disagree on method.  With respect, I don&#8217;t think that the correct thing is to generate the DOM on the server at all.  I&#8217;ve found a RESTful client-centric approach to be much better: stream JSON to the browser, create your DOM there, and just send back JSON as you need to.  This also minimises server load.  Takes about 1.5x the time to set this up (although MVC is making it easier), but once you&#8217;ve got it set up for a particular application domain it&#8217;s a remarkably flexible and modular way of doing things.</p>
<p>I also agree with you on the language aspect: Javascript is, fundamentally, a good language (with some bloody idiotic features, such as making global creation very easy).  However, Javascript+browser or Javascript+DOM interactions are <em>painful</em>, and I therefore try to abstract away as many of those interactions as possible with jQuery.  These are the same interactions that you point to as being therapy material.  Are you sure that your hatred should not be directed at the DOM/browser, rather than the language?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Anirudh</title>
		<link>http://mono-nono.com/2009/08/19/c-is-number-10/comment-page-1/#comment-1063</link>
		<dc:creator>Anirudh</dc:creator>
		<pubDate>Wed, 19 Aug 2009 15:05:48 +0000</pubDate>
		<guid isPermaLink="false">http://mono-nono.com/?p=553#comment-1063</guid>
		<description>Richard,

I am deeply offended by your comment. I own an &quot;I hate javascript&quot; T-Shirt and I stand by it. All the jQuery plugins in the world won&#039;t save you from the hell that are regressions introduced on a single browser. I&#039;ve written a good bit of javascript in the past and it still gives me nightmares bad enough to consider therapy.

As a language, it&#039;s great - I can use anonymous functions, it has rock-solid closure support, loose binding, etc. I can extend classes on the fly with prototype(the language concept, not the library).

The problem comes in when you start doing it in the real world - you have to check for regressions on multiple browsers, and unless you&#039;re patient enough to write functional-tests your app with something like Selenium or Webdriver, you&#039;re going to find that one day, something breaks and nothing works. Unit tests like fireUnit or jsUnit won&#039;t save you as dom manipulations can&#039;t be easily tested.

Debugging javascript is a pain. Yes I know about firebug and Aptana&#039;s debugger, but in a statically typed language, most of those kind of bugs don&#039;t arise in the first place. Absolute lack of threading support, timers that are giant hacks, and such horribly different behavior across different sessions, let alone different browsers make it a really bad experience. jQuery and the DOM tree is nice, but it requires a lot of trouble, especially if you&#039;re generating the DOM from the server and you need to keep your ids in sync with the one your JS expects.

The only thing is that with the web-apps coming into place, everyone _has_ to write javascript, and support atleast IE7, which is a big pain. One could use something like Google Web Toolkit, Webforms, script#, or any other framework which won&#039;t require you to write javascript, but it significantly sacrifices power.

TL;DR:
Javascript as a language is fun to show off in a rhino shell at conferences, somewhat like them ruby blokes do, but when you&#039;re writing it for a large browser-based application, you can&#039;t help but hate it.</description>
		<content:encoded><![CDATA[<p>Richard,</p>
<p>I am deeply offended by your comment. I own an &#8220;I hate javascript&#8221; T-Shirt and I stand by it. All the jQuery plugins in the world won&#8217;t save you from the hell that are regressions introduced on a single browser. I&#8217;ve written a good bit of javascript in the past and it still gives me nightmares bad enough to consider therapy.</p>
<p>As a language, it&#8217;s great &#8211; I can use anonymous functions, it has rock-solid closure support, loose binding, etc. I can extend classes on the fly with prototype(the language concept, not the library).</p>
<p>The problem comes in when you start doing it in the real world &#8211; you have to check for regressions on multiple browsers, and unless you&#8217;re patient enough to write functional-tests your app with something like Selenium or Webdriver, you&#8217;re going to find that one day, something breaks and nothing works. Unit tests like fireUnit or jsUnit won&#8217;t save you as dom manipulations can&#8217;t be easily tested.</p>
<p>Debugging javascript is a pain. Yes I know about firebug and Aptana&#8217;s debugger, but in a statically typed language, most of those kind of bugs don&#8217;t arise in the first place. Absolute lack of threading support, timers that are giant hacks, and such horribly different behavior across different sessions, let alone different browsers make it a really bad experience. jQuery and the DOM tree is nice, but it requires a lot of trouble, especially if you&#8217;re generating the DOM from the server and you need to keep your ids in sync with the one your JS expects.</p>
<p>The only thing is that with the web-apps coming into place, everyone _has_ to write javascript, and support atleast IE7, which is a big pain. One could use something like Google Web Toolkit, Webforms, script#, or any other framework which won&#8217;t require you to write javascript, but it significantly sacrifices power.</p>
<p>TL;DR:<br />
Javascript as a language is fun to show off in a rhino shell at conferences, somewhat like them ruby blokes do, but when you&#8217;re writing it for a large browser-based application, you can&#8217;t help but hate it.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Jo Shields</title>
		<link>http://mono-nono.com/2009/08/19/c-is-number-10/comment-page-1/#comment-1062</link>
		<dc:creator>Jo Shields</dc:creator>
		<pubDate>Wed, 19 Aug 2009 13:33:09 +0000</pubDate>
		<guid isPermaLink="false">http://mono-nono.com/?p=553#comment-1062</guid>
		<description>I&#039;d rather shave my balls than go back to a weakly-everything language like JS</description>
		<content:encoded><![CDATA[<p>I&#8217;d rather shave my balls than go back to a weakly-everything language like JS</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Richard</title>
		<link>http://mono-nono.com/2009/08/19/c-is-number-10/comment-page-1/#comment-1061</link>
		<dc:creator>Richard</dc:creator>
		<pubDate>Wed, 19 Aug 2009 13:22:34 +0000</pubDate>
		<guid isPermaLink="false">http://mono-nono.com/?p=553#comment-1061</guid>
		<description>Javascript?  Yes, I used to think so, too ... but if you look at it as a prototypical, functional language trapped in an OO body, it&#039;s quite fun to use.  With the advent of cross-browser frameworks (mootools, jQuery, GWT, etc), decent JS performance in browsers, and the ease-of-use of JSON, it&#039;s no wonder that it&#039;s showing positive growth.  Play with jQuery and Prototype for a bit, and you&#039;ll see how nice JavaScript can be ;).</description>
		<content:encoded><![CDATA[<p>Javascript?  Yes, I used to think so, too &#8230; but if you look at it as a prototypical, functional language trapped in an OO body, it&#8217;s quite fun to use.  With the advent of cross-browser frameworks (mootools, jQuery, GWT, etc), decent JS performance in browsers, and the ease-of-use of JSON, it&#8217;s no wonder that it&#8217;s showing positive growth.  Play with jQuery and Prototype for a bit, and you&#8217;ll see how nice JavaScript can be <img src='http://mono-nono.com/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' /> .</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Jo Shields</title>
		<link>http://mono-nono.com/2009/08/19/c-is-number-10/comment-page-1/#comment-1060</link>
		<dc:creator>Jo Shields</dc:creator>
		<pubDate>Wed, 19 Aug 2009 12:18:13 +0000</pubDate>
		<guid isPermaLink="false">http://mono-nono.com/?p=553#comment-1060</guid>
		<description>Only 4 languages showed positive growth in 12 months... C# was one of them, yeah fine, but...

Javascript? &lt;b&gt;&lt;i&gt;EW&lt;/i&gt;&lt;/b&gt;</description>
		<content:encoded><![CDATA[<p>Only 4 languages showed positive growth in 12 months&#8230; C# was one of them, yeah fine, but&#8230;</p>
<p>Javascript? <b><i>EW</i></b></p>
]]></content:encoded>
	</item>
</channel>
</rss>
