[erlang-questions] Design patterns?

Gordon Guthrie gguthrie@REDACTED
Wed Mar 4 09:11:50 CET 2015


The key thing here is the story of OTP.

Erlang was deployed and a number of systems were built.

These systems (and the patterns they used) were analysed and then the OTP libraries (and behaviours) which encapsulate the common patterns were released.

So Erlanger’s don’t tend to talk about ‘design patterns’ so much as ‘use OPT’

It’s a bit IKEA-like - a design pattern sez “this is how you build a wheel” - IKEA sez "all all furniture uses the same wheel - this is the wheel"


> Le 3 mars 2015 à 17:44, Judson Lester <nyarly@REDACTED> a écrit :
> On Tue, Mar 3, 2015 at 12:30 AM Gordon Guthrie <gguthrie@REDACTED <mailto:gguthrie@REDACTED>> wrote:
> Generally function heads are 'better' than cases, particularly if there are a lot of them...
> This email would be easier to answer if there was some code so people could outline options...
> I deliberately didn't include any code because I was more interested in talking about the overall idea ("do erlangers discuss design patterns?") than "it'd be better if you..." As is it seems like including examples without code was too much of a distraction :)
> I think I was coming to the (general?) conclusion about case statements: they're an intermediary step that are only occasionally left as-is.
> I think I'm also slowly understanding how powerful (and therefore important) the tooling is in Erlang - I'd figured out common_test on my own, and been integrating that with eunit slowly. But dialyzer is an amazing tool, and it seems like I should sink the time into learning xref, too. Together, they seem to influence the design and structure of Erlang in many little ways.
> The question remains though: do erlangers discuss design patterns? (I see a lot of "I'd do it this way..." which seems like sort of the same thing.)
> Judson

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://erlang.org/pipermail/erlang-questions/attachments/20150304/096533ad/attachment.htm>

More information about the erlang-questions mailing list