<?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"
	>
<channel>
	<title>Comments on: Javascript puzzler: throw null</title>
	<atom:link href="http://niksilver.com/2006/11/23/javascript-puzzler-throw-null/feed/" rel="self" type="application/rss+xml" />
	<link>http://niksilver.com/2006/11/23/javascript-puzzler-throw-null/</link>
	<description>Mostly about the management of software development</description>
	<pubDate>Thu, 04 Dec 2008 20:24:58 +0000</pubDate>
	<generator>http://wordpress.org/?v=2.6.3</generator>
		<item>
		<title>By: Nik</title>
		<link>http://niksilver.com/2006/11/23/javascript-puzzler-throw-null/#comment-8302</link>
		<dc:creator>Nik</dc:creator>
		<pubDate>Wed, 30 May 2007 20:05:11 +0000</pubDate>
		<guid isPermaLink="false">http://niksilver.com/2006/11/23/javascript-puzzler-throw-null/#comment-8302</guid>
		<description>aarondr, you're right that it's not good practice to use the thrown object to identify the fact of the exception, but that's much easier to say that after the event. The pain I experienced was due to someone else's very poor code which threw null. But it was allowed to throw null due to Javascript's typing being so loose its trousers are round its ankles.

Meanwhile, I'm not sure about that particular argument in favour of loose typing. I wouldn't speak too ill of loose typing -- it certainly has its place. But just because a language doesn't trap compile-time errors it doesn't follow that it therefore helps you trap runtime errors.</description>
		<content:encoded><![CDATA[<p>aarondr, you&#8217;re right that it&#8217;s not good practice to use the thrown object to identify the fact of the exception, but that&#8217;s much easier to say that after the event. The pain I experienced was due to someone else&#8217;s very poor code which threw null. But it was allowed to throw null due to Javascript&#8217;s typing being so loose its trousers are round its ankles.</p>
<p>Meanwhile, I&#8217;m not sure about that particular argument in favour of loose typing. I wouldn&#8217;t speak too ill of loose typing &#8212; it certainly has its place. But just because a language doesn&#8217;t trap compile-time errors it doesn&#8217;t follow that it therefore helps you trap runtime errors.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: aarondr</title>
		<link>http://niksilver.com/2006/11/23/javascript-puzzler-throw-null/#comment-8283</link>
		<dc:creator>aarondr</dc:creator>
		<pubDate>Wed, 30 May 2007 18:04:32 +0000</pubDate>
		<guid isPermaLink="false">http://niksilver.com/2006/11/23/javascript-puzzler-throw-null/#comment-8283</guid>
		<description>I know this is old, but I never really felt like using the object that is thrown is a good practice.  Honestly, you know if the catch block executes that there was a problem, so why not just say, 
problem_found = true;
One thing I have learned is to expect that 'null' may exist where I don't expect, and if I don't have control over the object, then I certainly don't know what to expect out of it.

I prefer JavaScript over Java only to the fact that I have much more freedom of expression, and I am not having to keep strict types.  Strict typing only offers compile time safety and error checking, runtime errors are much more dangerous anyways.  I one respect, JavaScript lets you concentrate on removing the more important errors.  This instance I blame the interpreter, not the language.</description>
		<content:encoded><![CDATA[<p>I know this is old, but I never really felt like using the object that is thrown is a good practice.  Honestly, you know if the catch block executes that there was a problem, so why not just say,<br />
problem_found = true;<br />
One thing I have learned is to expect that &#8216;null&#8217; may exist where I don&#8217;t expect, and if I don&#8217;t have control over the object, then I certainly don&#8217;t know what to expect out of it.</p>
<p>I prefer JavaScript over Java only to the fact that I have much more freedom of expression, and I am not having to keep strict types.  Strict typing only offers compile time safety and error checking, runtime errors are much more dangerous anyways.  I one respect, JavaScript lets you concentrate on removing the more important errors.  This instance I blame the interpreter, not the language.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: zproxy</title>
		<link>http://niksilver.com/2006/11/23/javascript-puzzler-throw-null/#comment-5606</link>
		<dc:creator>zproxy</dc:creator>
		<pubDate>Wed, 11 Apr 2007 07:42:53 +0000</pubDate>
		<guid isPermaLink="false">http://niksilver.com/2006/11/23/javascript-puzzler-throw-null/#comment-5606</guid>
		<description>But you could compile statically typed language to javascript :)

visit http://jsc.sf.net</description>
		<content:encoded><![CDATA[<p>But you could compile statically typed language to javascript <img src='http://niksilver.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<p>visit <a href="http://jsc.sf.net" rel="nofollow">http://jsc.sf.net</a></p>
]]></content:encoded>
	</item>
</channel>
</rss>
