[erlang-questions] "Design patterns" for functional languages?
Kevin A. Smith
kevin@REDACTED
Thu Aug 7 00:03:18 CEST 2008
The reference to message passing behind functions is exactly the kind
of thing I had in mind in an "Effective Erlang" style book. There are
tons of these kinds of practical patterns which could be documented
for the benefit of all.
--Kevin
Sent from my iPhone
On Aug 6, 2008, at 5:15 PM, Kevin Scaldeferri <kevin@REDACTED>
wrote:
>
> On Aug 5, 2008, at 11:46 PM, David Mitchell wrote:
>
>> 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.
>
>
> Yeah, functional programming has _different_ patterns, not no
> patterns. And, in some sense they also highlight shortcomings.
>
> For example, functional languages typically do not have lists that
> you can append to efficiently, so we need the "Accumulate and
> Reverse" pattern.
>
> Erlang doesn't allow you to enumerate the messages a process can
> receive, so we have a "Hide Message-Passing Behind Functions" pattern.
>
>
> I'm sure others can pitch in with more examples.
>
> -kevin
More information about the erlang-questions
mailing list