[erlang-questions] "Design patterns" for functional languages?

David Mitchell monch1962@REDACTED
Wed Aug 6 08:46:08 CEST 2008


Thanks to everyone who's responded.

Work's managed to deal me a pretty ugly hand over the past 24 hours -
got loads of new stuff to do - so I'll have to put this quest on the
backburner for a while.

I'm not sure I agree with the statement quoted by Michael that FP
doesn't have the shortcomings of OO so GoF-like patterns aren't
necessary.  I'm sure that, given time and access to a suitable
GoF/FP-type mentor, I could reconstruct some of what I've done
recently in Erlang, and achieve greater goodness than I have at this
point.  I've already taken tentative steps down this path in some
instances, but I'm finding myself treading what feels like a fine line
between building better structured code, and introducing unwanted
"cleverness".  Being a reformed Perl junkie, I'm very suspicious of
"cleverness" in general...

Oh well, the journey continues...

Regards

David Mitchell

2008/8/6 Kevin A. Smith <kevin@REDACTED>:
> I'd put some money down on "Effective Erlang", if anyone ever got around to
> writing that :)
>
> --Kevin
> On Aug 5, 2008, at 12:55 PM, Matt Kangas wrote:
>
>> David,
>>
>> I see Hynek has already suggested SICP. Another, possibly gentler,
>> book that you may find helpful: "The Little Schemer". Some time ago I
>> rewrote most of the book's code in Erlang as a learning exercise:
>>
>> http://www.p16blog.com/p16/2008/01/erlang-version.html
>>
>> Code: http://p16blog.googlecode.com/svn/trunk/learning_erlang/little.erl
>>
>> I'm still kicking around the idea of fleshing this out into something
>> book-like, but have been too busy otherwise. If you find this code
>> useful or have suggestions for improving it, please let me know!
>>
>> Cheers,
>> --Matt
>>
>>
>> On Tue, Aug 5, 2008 at 4:15 AM, David Mitchell <monch1962@REDACTED>
>> wrote:
>>>
>>> G'day all,
>>>
>>> I'm looking for a good source of "design patterns" information for
>>> functional languages: Erlang in particular, but also applicable to
>>> OCaml.  While I've written a smallish bunch of Erlang apps now and all
>>> have gone reasonably well, I'm stuck with the feeling that I'm
>>> reinventing some wheels in a less-than-optimal fashion.
>>>
>>> Google shows up a bunch of sites containing functional design patterns
>>> out there, but the ones I've examined don't seem to be particularly
>>> ... how can I put this? ... well thought out.
>>>
>>> Does anyone have a good reference for functional design pattern info,
>>> that's both well explained and covers a useful subset of real-life
>>> cases?  I guess I'm looking for the functional equivalent of the Gang
>>> of Four "Design Patterns" book, but focusing on functional languages
>>> and preferably free.
>>>
>>> Regards
>>>
>>> David Mitchell
>>
>>
>> --
>> Matt Kangas
>> matt@REDACTED
>> _______________________________________________
>> erlang-questions mailing list
>> erlang-questions@REDACTED
>> http://www.erlang.org/mailman/listinfo/erlang-questions
>
>



More information about the erlang-questions mailing list