<?xml version='1.0' encoding='iso-8859-1'?><?xml-stylesheet type='text/xsl' href='http://w3future.com/w3f/w3f.xsl' ?>
<html xmlns="http://www.w3.org/2002/06/xhtml2" xmlns:ev="http://www.w3.org/2001/xml-events" xmlns:xi="http://www.w3.org/2001/XInclude" xmlns:xf="http://www.w3.org/2002/xforms/cr" xml:lang="en" xml:base="http://w3future.com/weblog/2003/08/13.xml">
<head>
<title>Wednesday, August 13, 2003 - Sjoerd Visscher's weblog</title>
<link rel="meta" type="application/rdf+xml" title="FOAF" href="http://w3future.com/people/sjoerd_visscher/foaf.rdf" />
</head>
<body>
<section id="content">
	<h>Sjoerd Visscher's weblog</h>
	<p>Pondering those web technologies that may change the future of the world wide web.</p>
	<section id="note">
		<h>Last Update</h>
		<p>10/16/2005; 1:28:43 AM</p>
		<p id="alternates" class="buttons">
			<l href="http://w3future.com/weblog/2003/08/13.xml?notransform" rel="alternate" type="application/xml" title="See this web page with XHTML 2.0 technology."><span>Try</span> XHTML 2.0</l>
			<l href="view-source:http://w3future.com/weblog/2003/08/13.xml?notransform" title="View the XHTML 2.0 source of this page."><span>Src</span> XHTML 2.0</l>
			<l href="http://w3future.com/tools/xr.pl?xr=http://w3future.com/xr/w3f.xml&amp;xml=http://w3future.com/weblog/2003/08/13.xml%3Fnotransform" rel="meta" type="application/rdf+xml" title="RDF metadata"><span>RDF</span> Metadata</l>
		</p>
		<xi:include href="http://w3future.com/w3f/buttons.xml" />
	</section><section>
  <h><a rel='prev' href='http://w3future.com/weblog/2003/08/04.xml#a225' title='Monday, August 04, 2003'>&lt;&#160;</a><a href="http://w3future.com/weblog/2003/08/13.xml">Wednesday, August 13, 2003</a><a rel='next' href='http://w3future.com/weblog/2003/08/14.txt#a227' title='Thursday, August 14, 2003'>&#160;&gt;</a></h>
<a name="a255"></a>
<section id="a255">
<h id='programmingTheory'><a href="http://w3future.com/weblog/2003/08/13.xml#a255" class="weblogItemTitle">Programming theory</a></h>
<p>I've been reading <a href="http://citeseer.nj.nec.com/jacobs97tutorial.html">A Tutorial on (Co)Algebras and (Co)Induction</a>. What I'm wondering when reading it, is the use of tuples. Everything is converted to and from tuples. An example:</p>
<pre>data List = Nil | Cons Integer List

head Cons x xs = x
tail Cons x xs = xs</pre>
<p>The <code>Cons</code> constructor creates a tuple. The <code>head</code> and <code>tail</code> destructor extract it again. Now look at a hypothetical "object oriented" system:</p>
<pre>List = Nil | Cons

Nil = Class[]

Cons = Class[
  head = Integer
  tail = List
]</pre>
<p>Now the constructors and destructors are defined together. The storage spaces Cons provides are in effect named. This is for me the most important reason why Object Oriented style works. Most if not all functional languages encourage the use of tuples and lists, which makes the purpose of the data anonymous.</p>
<p>I like almost everything else I read in the tutorial. It's only the product of types that I'd like to change from the positional <code>A x B x C</code> to the named <code>p:A x q:B x r:C</code> (where the order is not important). Maybe the interesting, but hard to understand, theories that are built on top of (co)algebras and (co)induction will actually become readable.</p>
</section>
</section>
<xi:include href='http://w3future.com/tools/rdf.php?about=http://w3future.com/weblog/2003/08/13.xml' /></section>
<section id="navigation"><xi:include href="http://w3future.com/w3f/sections.xml" /></section>
<section id="sidebar"><xi:include href="http://w3future.com/weblog/sidebars/weblog.opml" /></section>
</body>
</html>

