<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	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/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>David Otton &#187; c</title>
	<atom:link href="http://www.otton.org/tag/c/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.otton.org</link>
	<description>Look! Bunnies!</description>
	<lastBuildDate>Wed, 06 Jan 2010 14:32:48 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.1</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>&#8220;What were they thinking?&#8221;: &#8220;They were thinking like C programmers&#8221;</title>
		<link>http://www.otton.org/2008/01/02/what-were-they-thinking-they-were-thinking-like-c-programmers/</link>
		<comments>http://www.otton.org/2008/01/02/what-were-they-thinking-they-were-thinking-like-c-programmers/#comments</comments>
		<pubDate>Wed, 02 Jan 2008 03:41:21 +0000</pubDate>
		<dc:creator>David</dc:creator>
				<category><![CDATA[programming]]></category>
		<category><![CDATA[c]]></category>
		<category><![CDATA[php]]></category>

		<guid isPermaLink="false">http://www.otton.org/2008/01/02/what-were-they-thinking-they-were-thinking-like-c-programmers/</guid>
		<description><![CDATA[API Archaeology. Heh.
If he thinks he has troubles, he should try PHP&#8217;s string and array libraries. You can really see the accretion of &#8220;thought&#8221; there. On a related note, here are some signatures for various PHP error handlers. First, an assert handler:

function assert_handler&#40; $file, $line, $message &#41;;

an error handler:

function error_handler&#40; $errno, $message, $file, $line, $errcontext [...]]]></description>
			<content:encoded><![CDATA[<p><a title="Short comment on Java APIs" href="http://fishbowl.pastiche.org/2007/12/24/api_archaeology">API Archaeology</a>. Heh.</p>
<p>If he thinks he has troubles, he should try PHP&#8217;s string and array libraries. You can really see the accretion of &#8220;thought&#8221; there. On a related note, here are some signatures for various PHP error handlers. First, an assert handler:</p>
<p><code>
<pre><span style="color: #000000; font-weight: bold;">function</span> assert_handler<span style="color: #66cc66;">&#40;</span> <span style="color: #0000ff;">$file</span>, <span style="color: #0000ff;">$line</span>, <span style="color: #0000ff;">$message</span> <span style="color: #66cc66;">&#41;</span>;</pre>
<p></code></p>
<p>an error handler:</p>
<p><code>
<pre><span style="color: #000000; font-weight: bold;">function</span> error_handler<span style="color: #66cc66;">&#40;</span> <span style="color: #0000ff;">$errno</span>, <span style="color: #0000ff;">$message</span>, <span style="color: #0000ff;">$file</span>, <span style="color: #0000ff;">$line</span>, <span style="color: #0000ff;">$errcontext</span> <span style="color: #66cc66;">&#41;</span></pre>
<p></code></p>
<p>How to set an assert handler:</p>
<p><code>
<pre><a href="http://www.php.net/assert_options"><span style="color: #000066;">assert_options</span></a><span style="color: #66cc66;">&#40;</span> ASSERT_CALLBACK, <span style="color: #ff0000;">'assert_handler'</span> <span style="color: #66cc66;">&#41;</span></pre>
<p></code></p>
<p>And an error handler:</p>
<p><code>
<pre><a href="http://www.php.net/set_error_handler"><span style="color: #000066;">set_error_handler</span></a><span style="color: #66cc66;">&#40;</span> <span style="color: #ff0000;">'error_handler'</span> <span style="color: #66cc66;">&#41;</span></pre>
<p></code></p>
<p>Nobody could get it this wrong by chance. I think it&#8217;s wilful.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.otton.org/2008/01/02/what-were-they-thinking-they-were-thinking-like-c-programmers/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
