<html><head><meta http-equiv="Content-Type" content="text/html charset=utf-8"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class="">Judson<div class=""><br class=""></div><div class="">The key thing here is the story of OTP.</div><div class=""><br class=""></div><div class="">Erlang was deployed and a number of systems were built.</div><div class=""><br class=""></div><div class="">These systems (and the patterns they used) were analysed and then the OTP libraries (and behaviours) which encapsulate the common patterns were released.</div><div class=""><br class=""></div><div class="">So Erlanger’s don’t tend to talk about ‘design patterns’ so much as ‘use OPT’</div><div class=""><br class=""></div><div class="">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"</div><div class=""><br class=""></div><div class="">Gordon</div><div class=""><br class=""></div><div class=""><br class=""><div><blockquote type="cite" class=""><div class="">Le 3 mars 2015 à 17:44, Judson Lester <<a href="mailto:nyarly@gmail.com" class="">nyarly@gmail.com</a>> a écrit :</div><br class="Apple-interchange-newline"><div class=""><div dir="ltr" class=""><div class="gmail_quote">On Tue, Mar 3, 2015 at 12:30 AM Gordon Guthrie <<a href="mailto:gguthrie@basho.com" class="">gguthrie@basho.com</a>> wrote:<br class=""><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div class=""><div style="font-family:Calibri,sans-serif;font-size:11pt" class="">Generally function heads are 'better' than cases, particularly if there are a lot of them...<br class=""><br class="">This email would be easier to answer if there was some code so people could outline options...<br class=""></div></div></blockquote><div class=""><br class=""></div><div class="">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 :)</div><div class=""><br class=""></div><div class="">I think I was coming to the (general?) conclusion about case statements: they're an intermediary step that are only occasionally left as-is.</div><div class=""><br class=""></div><div class="">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.</div><div class=""><br class=""></div><div class="">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.)</div><div class=""><br class=""></div><div class="">Judson</div></div></div>
</div></blockquote></div><br class=""></div></body></html>