[erlang-questions] "Design patterns" for functional languages?
Wed Aug 6 23:20:43 CEST 2008
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.
On Wed, Aug 6, 2008 at 2:46 AM, David Mitchell <monch1962@REDACTED> wrote:
> 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...
> David Mitchell
> 2008/8/6 Kevin A. Smith <kevin@REDACTED>:
> > I'd put some money down on "Effective Erlang", if anyone ever got around
> > 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:
> >> 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
> erlang-questions mailing list
For every expert there is an equal and opposite expert - Arthur C. Clarke
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the erlang-questions