<div dir="ltr">Even if the term "design patterns" doesn't fit (and I think it does fit - what is OTP if not a collection of design patterns and architectural patterns?), Erlang certainly has numerous programming idioms and practices that would be extremely useful to beginners and intermediate programmers, if catalogued. Something like what Herb Sutter did for C++ in his Exceptional C++ series. I've often wanted to do this myself but feel like I'm not qualified because I've only learned Erlang/OTP fairly recently.<br>
<br><div class="gmail_quote">On Wed, Aug 6, 2008 at 2:46 AM, David Mitchell <span dir="ltr"><<a href="mailto:monch1962@gmail.com">monch1962@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
Thanks to everyone who's responded.<br>
<br>
Work's managed to deal me a pretty ugly hand over the past 24 hours -<br>
got loads of new stuff to do - so I'll have to put this quest on the<br>
backburner for a while.<br>
<br>
I'm not sure I agree with the statement quoted by Michael that FP<br>
doesn't have the shortcomings of OO so GoF-like patterns aren't<br>
necessary.  I'm sure that, given time and access to a suitable<br>
GoF/FP-type mentor, I could reconstruct some of what I've done<br>
recently in Erlang, and achieve greater goodness than I have at this<br>
point.  I've already taken tentative steps down this path in some<br>
instances, but I'm finding myself treading what feels like a fine line<br>
between building better structured code, and introducing unwanted<br>
"cleverness".  Being a reformed Perl junkie, I'm very suspicious of<br>
"cleverness" in general...<br>
<br>
Oh well, the journey continues...<br>
<br>
Regards<br>
<br>
David Mitchell<br>
<br>
2008/8/6 Kevin A. Smith <<a href="mailto:kevin@hypotheticalabs.com">kevin@hypotheticalabs.com</a>>:<br>
<div><div></div><div class="Wj3C7c">> I'd put some money down on "Effective Erlang", if anyone ever got around to<br>
> writing that :)<br>
><br>
> --Kevin<br>
> On Aug 5, 2008, at 12:55 PM, Matt Kangas wrote:<br>
><br>
>> David,<br>
>><br>
>> I see Hynek has already suggested SICP. Another, possibly gentler,<br>
>> book that you may find helpful: "The Little Schemer". Some time ago I<br>
>> rewrote most of the book's code in Erlang as a learning exercise:<br>
>><br>
>> <a href="http://www.p16blog.com/p16/2008/01/erlang-version.html" target="_blank">http://www.p16blog.com/p16/2008/01/erlang-version.html</a><br>
>><br>
>> Code: <a href="http://p16blog.googlecode.com/svn/trunk/learning_erlang/little.erl" target="_blank">http://p16blog.googlecode.com/svn/trunk/learning_erlang/little.erl</a><br>
>><br>
>> I'm still kicking around the idea of fleshing this out into something<br>
>> book-like, but have been too busy otherwise. If you find this code<br>
>> useful or have suggestions for improving it, please let me know!<br>
>><br>
>> Cheers,<br>
>> --Matt<br>
>><br>
>><br>
>> On Tue, Aug 5, 2008 at 4:15 AM, David Mitchell <<a href="mailto:monch1962@gmail.com">monch1962@gmail.com</a>><br>
>> wrote:<br>
>>><br>
>>> G'day all,<br>
>>><br>
>>> I'm looking for a good source of "design patterns" information for<br>
>>> functional languages: Erlang in particular, but also applicable to<br>
>>> OCaml.  While I've written a smallish bunch of Erlang apps now and all<br>
>>> have gone reasonably well, I'm stuck with the feeling that I'm<br>
>>> reinventing some wheels in a less-than-optimal fashion.<br>
>>><br>
>>> Google shows up a bunch of sites containing functional design patterns<br>
>>> out there, but the ones I've examined don't seem to be particularly<br>
>>> ... how can I put this? ... well thought out.<br>
>>><br>
>>> Does anyone have a good reference for functional design pattern info,<br>
>>> that's both well explained and covers a useful subset of real-life<br>
>>> cases?  I guess I'm looking for the functional equivalent of the Gang<br>
>>> of Four "Design Patterns" book, but focusing on functional languages<br>
>>> and preferably free.<br>
>>><br>
>>> Regards<br>
>>><br>
>>> David Mitchell<br>
>><br>
>><br>
>> --<br>
>> Matt Kangas<br>
>> <a href="mailto:matt@daylife.com">matt@daylife.com</a><br>
>> _______________________________________________<br>
>> erlang-questions mailing list<br>
>> <a href="mailto:erlang-questions@erlang.org">erlang-questions@erlang.org</a><br>
>> <a href="http://www.erlang.org/mailman/listinfo/erlang-questions" target="_blank">http://www.erlang.org/mailman/listinfo/erlang-questions</a><br>
><br>
><br>
_______________________________________________<br>
erlang-questions mailing list<br>
<a href="mailto:erlang-questions@erlang.org">erlang-questions@erlang.org</a><br>
<a href="http://www.erlang.org/mailman/listinfo/erlang-questions" target="_blank">http://www.erlang.org/mailman/listinfo/erlang-questions</a><br>
<br>
</div></div></blockquote></div><br><br clear="all"><br>-- <br>For every expert there is an equal and opposite expert - Arthur C. Clarke<br>
</div>