<?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: What&#8217;s the erlangish way?</title>
	<atom:link href="http://bzimmer.ziclix.com/2008/05/01/whats-the-erlangish-way/feed/" rel="self" type="application/rss+xml" />
	<link>http://bzimmer.ziclix.com/2008/05/01/whats-the-erlangish-way/</link>
	<description>Whatever's top of mind.</description>
	<pubDate>Mon, 08 Sep 2008 03:41:42 +0000</pubDate>
	<generator>http://wordpress.org/?v=2.6.1</generator>
		<item>
		<title>By: ppolv</title>
		<link>http://bzimmer.ziclix.com/2008/05/01/whats-the-erlangish-way/#comment-8</link>
		<dc:creator>ppolv</dc:creator>
		<pubDate>Thu, 01 May 2008 20:40:16 +0000</pubDate>
		<guid isPermaLink="false">http://bzimmer.wordpress.com/?p=23#comment-8</guid>
		<description>Hi,
I think the erlangish way is to provide a last argument where to pass *optional* parameters as a list of tuples.
The convention is to use the first element of the tuple as the keyword. (see the proplists module in stdlib).
So, if 'title' is the only required parameter, I would go with something like this:

albums_create(Title) -&#62; albums_create(Title,[]).

albums_create(Title,Opts) -&#62;
     [..]

where Opts = [Opt]
Opt = {description,Description} &#124; {public,Public} ...</description>
		<content:encoded><![CDATA[<p>Hi,<br />
I think the erlangish way is to provide a last argument where to pass *optional* parameters as a list of tuples.<br />
The convention is to use the first element of the tuple as the keyword. (see the proplists module in stdlib).<br />
So, if &#8216;title&#8217; is the only required parameter, I would go with something like this:</p>
<p>albums_create(Title) -&gt; albums_create(Title,[]).</p>
<p>albums_create(Title,Opts) -&gt;<br />
     [..]</p>
<p>where Opts = [Opt]<br />
Opt = {description,Description} | {public,Public} &#8230;</p>
]]></content:encoded>
	</item>
</channel>
</rss>

<!-- Dynamic Page Served (once) in 0.170 seconds -->
